@@ -195,35 +195,37 @@ func TestHealthAnnotationMetadata(t *testing.T) {
195195 groupBy flowslatest.HealthRuleGroupBy
196196 expectedNodeLabels []string
197197 expectedNamespaceLabels []string
198- expectedOwnerLabels []string
198+ expectedWorkloadLabels []string
199+ expectedKindLabels []string
199200 }{
200201 {
201202 name : "Global (no grouping)" ,
202203 groupBy : "" ,
203204 expectedNodeLabels : nil ,
204205 expectedNamespaceLabels : nil ,
205- expectedOwnerLabels : nil ,
206+ expectedWorkloadLabels : nil ,
206207 },
207208 {
208209 name : "GroupBy Node" ,
209210 groupBy : flowslatest .GroupByNode ,
210211 expectedNodeLabels : []string {"node" },
211212 expectedNamespaceLabels : nil ,
212- expectedOwnerLabels : nil ,
213+ expectedWorkloadLabels : nil ,
213214 },
214215 {
215216 name : "GroupBy Namespace" ,
216217 groupBy : flowslatest .GroupByNamespace ,
217218 expectedNodeLabels : nil ,
218219 expectedNamespaceLabels : []string {"namespace" },
219- expectedOwnerLabels : nil ,
220+ expectedWorkloadLabels : nil ,
220221 },
221222 {
222223 name : "GroupBy Workload" ,
223224 groupBy : flowslatest .GroupByWorkload ,
224225 expectedNodeLabels : nil ,
225226 expectedNamespaceLabels : []string {"namespace" },
226- expectedOwnerLabels : []string {"workload" },
227+ expectedWorkloadLabels : []string {"workload" },
228+ expectedKindLabels : []string {"kind" },
227229 },
228230 }
229231
@@ -247,7 +249,8 @@ func TestHealthAnnotationMetadata(t *testing.T) {
247249
248250 assert .Equal (t , tt .expectedNodeLabels , ha .NodeLabels , "Expected nodeLabels=%s in annotation for %s" , tt .expectedNodeLabels , tt .name )
249251 assert .Equal (t , tt .expectedNamespaceLabels , ha .NamespaceLabels , "Expected namespaceLabels=%s in annotation for %s" , tt .expectedNamespaceLabels , tt .name )
250- assert .Equal (t , tt .expectedOwnerLabels , ha .OwnerLabels , "Expected ownerLabels=%s in annotation for %s" , tt .expectedOwnerLabels , tt .name )
252+ assert .Equal (t , tt .expectedWorkloadLabels , ha .WorkloadLabels , "Expected workloadLabels=%s in annotation for %s" , tt .expectedWorkloadLabels , tt .name )
253+ assert .Equal (t , tt .expectedKindLabels , ha .KindLabels , "Expected kindLabels=%s in annotation for %s" , tt .expectedKindLabels , tt .name )
251254 })
252255 }
253256}
0 commit comments