Skip to content

Commit 9c2642e

Browse files
Merge pull request #2389 from jsafrane/pecial-fg-tests
STOR-2481: UPSTREAM: <carry>: Skip SELinux test with Feature:SELinuxMountReadWriteteOncePodOnly
2 parents 1acd398 + b00ecad commit 9c2642e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

openshift-hack/cmd/k8s-tests-ext/environment_selectors.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55

66
et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
7+
"k8s.io/kubernetes/pkg/features"
78
)
89

910
// addEnvironmentSelectors adds the environmentSelector field to appropriate specs to facilitate including or excluding
@@ -25,6 +26,13 @@ func addEnvironmentSelectors(specs et.ExtensionTestSpecs) {
2526
specs.SelectAny([]et.SelectFunction{ // Since these must use "NameContainsAll" they cannot be included in filterByNetwork
2627
et.NameContainsAll("NetworkPolicy", "named port"),
2728
}).Exclude(et.NetworkEquals("OVNKubernetes")).AddLabel("[Skipped:Network/OVNKubernetes]")
29+
30+
// SELinux tests marked with [Feature:SELinuxMountReadWriteOncePodOnly] require SELinuxMount
31+
// feature gate **disabled**.
32+
// REBASE NOTE: this will intentionally fail to compile when the feature gate is removed upstream.
33+
// Just remove this check + notify the OCP storage team.
34+
specs.Select(et.NameContains("[Feature:SELinuxMountReadWriteOncePodOnly]")).
35+
Exclude(et.FeatureGateEnabled(string(features.SELinuxMount)))
2836
}
2937

3038
// filterByPlatform is a helper function to do, simple, "NameContains" filtering on tests by platform

0 commit comments

Comments
 (0)