Fix unit tests calling SetFeatureGateDuringTest incorrectly

This commit is contained in:
Jordan Liggitt
2018-11-21 09:50:21 -05:00
parent 4dca07ef7e
commit 70ad4dff48
5 changed files with 36 additions and 38 deletions

View File

@@ -6383,8 +6383,7 @@ func TestValidatePodSpec(t *testing.T) {
}
}
// original value will be restored by previous defer
utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PodShareProcessNamespace, false)
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PodShareProcessNamespace, false)()
featuregatedCases := map[string]core.PodSpec{
"set ShareProcessNamespace": {