mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-17 05:48:21 +00:00
test/e2e: fix broken feature-annotations test
This commit is contained in:
parent
dabd766531
commit
0d766a0fde
1 changed files with 10 additions and 7 deletions
|
@ -807,11 +807,11 @@ core:
|
||||||
Expect(testutils.CreateNodeFeatureRulesFromFile(ctx, nfdClient, "nodefeaturerule-5.yaml")).NotTo(HaveOccurred())
|
Expect(testutils.CreateNodeFeatureRulesFromFile(ctx, nfdClient, "nodefeaturerule-5.yaml")).NotTo(HaveOccurred())
|
||||||
|
|
||||||
By("Verifying node annotations from NodeFeatureRules #5")
|
By("Verifying node annotations from NodeFeatureRules #5")
|
||||||
expectedAnnotations["*"] = k8sAnnotations{
|
expectedAnnotations["*"][nfdv1alpha1.FeatureAnnotationNs+"/defaul-ns-annotation"] = "foo"
|
||||||
nfdv1alpha1.FeatureLabelNs + "/defaul-ns-annotation": "foo",
|
expectedAnnotations["*"][nfdv1alpha1.FeatureAnnotationNs+"/defaul-ns-annotation-2"] = "bar"
|
||||||
nfdv1alpha1.FeatureLabelNs + "/defaul-ns-annotation-2": "bar",
|
expectedAnnotations["*"]["custom.vendor.io/feature"] = "baz"
|
||||||
"custom.vendor.example/feature": "baz",
|
expectedAnnotations["*"][nfdv1alpha1.FeatureAnnotationsTrackingAnnotation] = "custom.vendor.io/feature,defaul-ns-annotation,defaul-ns-annotation-2"
|
||||||
}
|
|
||||||
eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes))
|
eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes))
|
||||||
|
|
||||||
By("Deleting NodeFeatureRule object")
|
By("Deleting NodeFeatureRule object")
|
||||||
|
@ -819,7 +819,10 @@ core:
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
|
|
||||||
By("Verifying node annotations from NodeFeatureRules #5 are deleted")
|
By("Verifying node annotations from NodeFeatureRules #5 are deleted")
|
||||||
expectedAnnotations["*"] = k8sAnnotations{}
|
delete(expectedAnnotations["*"], nfdv1alpha1.FeatureAnnotationNs+"/defaul-ns-annotation")
|
||||||
|
delete(expectedAnnotations["*"], nfdv1alpha1.FeatureAnnotationNs+"/defaul-ns-annotation-2")
|
||||||
|
delete(expectedAnnotations["*"], "custom.vendor.io/feature")
|
||||||
|
delete(expectedAnnotations["*"], nfdv1alpha1.FeatureAnnotationsTrackingAnnotation)
|
||||||
eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes))
|
eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes))
|
||||||
|
|
||||||
By("Deleting nfd-worker daemonset")
|
By("Deleting nfd-worker daemonset")
|
||||||
|
|
Loading…
Add table
Reference in a new issue