mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
skip special features in TestPodSecurityGAOnly
was causing some alpha/beta features to be disabled after running sometimes
This commit is contained in:
parent
a003138bf7
commit
9ef1fc543f
@ -75,7 +75,11 @@ func TestPodSecurity(t *testing.T) {
|
|||||||
func TestPodSecurityGAOnly(t *testing.T) {
|
func TestPodSecurityGAOnly(t *testing.T) {
|
||||||
// Disable all alpha and beta features
|
// Disable all alpha and beta features
|
||||||
for k, v := range utilfeature.DefaultFeatureGate.DeepCopy().GetAll() {
|
for k, v := range utilfeature.DefaultFeatureGate.DeepCopy().GetAll() {
|
||||||
if v.PreRelease == featuregate.Alpha || v.PreRelease == featuregate.Beta {
|
if k == "AllAlpha" || k == "AllBeta" {
|
||||||
|
// Skip special features. When processed first, special features may
|
||||||
|
// erroneously disable other features.
|
||||||
|
continue
|
||||||
|
} else if v.PreRelease == featuregate.Alpha || v.PreRelease == featuregate.Beta {
|
||||||
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, k, false)()
|
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, k, false)()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user