Skip to content

Commit 1522eb9

Browse files
stbenjamjsafrane
authored andcommitted
UPSTREAM: <carry>: Skip SELinux test with Feature:SELinuxMountReadWriteOncePodOnly
Tests with [Feature:SELinuxMountReadWriteOncePodOnly] must be skipped if SELinuxMount feature gate is set to true. See https://github.com/kubernetes/kubernetes/blob/1ce98e3c093e6c2eea794737de894394683c9ffb/test/e2e/storage/csimock/csi_selinux_mount.go#L50 for details how the SELinux tests use FeatureGate: / Feature: to test various combinations of the gates.
1 parent 050f9ab commit 1522eb9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ func addEnvironmentSelectors(specs et.ExtensionTestSpecs) {
2525
specs.SelectAny([]et.SelectFunction{ // Since these must use "NameContainsAll" they cannot be included in filterByNetwork
2626
et.NameContainsAll("NetworkPolicy", "named port"),
2727
}).Exclude(et.NetworkEquals("OVNKubernetes")).AddLabel("[Skipped:Network/OVNKubernetes]")
28+
29+
// SELinux tests marked with [Feature:SELinuxMountReadWriteOncePodOnly] require SELinuxMount
30+
// feature gate **disabled**.
31+
// TODO(jsafrane): once SELinuxMount graduates to GA, remove the tests upstream + remove this check.
32+
specs.Select(et.NameContains("[Feature:SELinuxMountReadWriteOncePodOnly]")).
33+
Exclude(et.FeatureGateEnabled("SELinuxMount"))
2834
}
2935

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

0 commit comments

Comments
 (0)