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.
This commit is contained in:
Patrick Ohly 2024-07-04 17:03:41 +02:00
parent 53c8efbe71
commit 4bed71dd15

View File

@ -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