mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
Merge pull request #1440 from marquiz/devel/e2e-fix
test/e2e: fix broken feature-annotations test
This commit is contained in:
commit
6b90401950
1 changed files with 10 additions and 7 deletions
|
@ -808,11 +808,11 @@ core:
|
|||
Expect(testutils.CreateNodeFeatureRulesFromFile(ctx, nfdClient, "nodefeaturerule-5.yaml")).NotTo(HaveOccurred())
|
||||
|
||||
By("Verifying node annotations from NodeFeatureRules #5")
|
||||
expectedAnnotations["*"] = k8sAnnotations{
|
||||
nfdv1alpha1.FeatureLabelNs + "/defaul-ns-annotation": "foo",
|
||||
nfdv1alpha1.FeatureLabelNs + "/defaul-ns-annotation-2": "bar",
|
||||
"custom.vendor.example/feature": "baz",
|
||||
}
|
||||
expectedAnnotations["*"][nfdv1alpha1.FeatureAnnotationNs+"/defaul-ns-annotation"] = "foo"
|
||||
expectedAnnotations["*"][nfdv1alpha1.FeatureAnnotationNs+"/defaul-ns-annotation-2"] = "bar"
|
||||
expectedAnnotations["*"]["custom.vendor.io/feature"] = "baz"
|
||||
expectedAnnotations["*"][nfdv1alpha1.FeatureAnnotationsTrackingAnnotation] = "custom.vendor.io/feature,defaul-ns-annotation,defaul-ns-annotation-2"
|
||||
|
||||
eventuallyNonControlPlaneNodes(ctx, f.ClientSet).Should(MatchAnnotations(expectedAnnotations, nodes))
|
||||
|
||||
By("Deleting NodeFeatureRule object")
|
||||
|
@ -820,7 +820,10 @@ core:
|
|||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
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))
|
||||
|
||||
By("Deleting nfd-worker daemonset")
|
||||
|
|
Loading…
Reference in a new issue