From c5174a835d6828b085eb379b9ab90227fdf5a803 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 8 Dec 2023 18:32:24 +0200 Subject: [PATCH] test/e2e: fix broken test Missed one check of NodeFeature API is enablement. --- test/e2e/node_feature_discovery_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/e2e/node_feature_discovery_test.go b/test/e2e/node_feature_discovery_test.go index 4347d6765..c5fde014e 100644 --- a/test/e2e/node_feature_discovery_test.go +++ b/test/e2e/node_feature_discovery_test.go @@ -855,11 +855,13 @@ core: err = f.ClientSet.AppsV1().DaemonSets(f.Namespace.Name).Delete(ctx, workerDS.Name, metav1.DeleteOptions{}) Expect(err).NotTo(HaveOccurred()) - By("Verify that labels from nfd-worker are garbage-collected") - expectedLabels = map[string]k8sLabels{ - "*": {}, + if useNodeFeatureApi { + By("Verify that labels from nfd-worker are garbage-collected") + expectedLabels = map[string]k8sLabels{ + "*": {}, + } + eventuallyNonControlPlaneNodes(ctx, f.ClientSet).WithTimeout(1 * time.Minute).Should(MatchLabels(expectedLabels, nodes)) } - eventuallyNonControlPlaneNodes(ctx, f.ClientSet).WithTimeout(1 * time.Minute).Should(MatchLabels(expectedLabels, nodes)) }) })