From 4bed71dd15ca50d2020d14222d0e485ee5bccc29 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 4 Jul 2024 17:03:41 +0200 Subject: [PATCH] e2e framework: don't add default skip when --label-filter is used The new pull-kubernetes-kind-dra uses -label-filter='Feature: containsAny DynamicResourceAllocation && !Flaky && !Serial' to run DRA tests. That didn't work because the E2E framework behind its back added the default skip expression. --- test/e2e/framework/test_context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 638cb2978f3..ba65d757a6e 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -399,7 +399,7 @@ func CreateGinkgoConfig() (types.SuiteConfig, types.ReporterConfig) { // Randomize specs as well as suites suiteConfig.RandomizeAllSpecs = true // Disable skipped tests unless they are explicitly requested. - if len(suiteConfig.FocusStrings) == 0 && len(suiteConfig.SkipStrings) == 0 { + if len(suiteConfig.FocusStrings) == 0 && len(suiteConfig.SkipStrings) == 0 && suiteConfig.LabelFilter == "" { suiteConfig.SkipStrings = []string{`\[Flaky\]|\[Feature:.+\]`} } return suiteConfig, reporterConfig