Pass new and old object to DropDisabledFields

This commit is contained in:
Jordan Liggitt
2018-12-18 17:50:22 -05:00
parent 88284f637b
commit 901ddba812
9 changed files with 28 additions and 18 deletions

View File

@@ -38,7 +38,7 @@ func TestDropAlphaProcMountType(t *testing.T) {
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ProcMountType, true)()
// now test dropping the fields - should not be dropped
DropDisabledFields(&psp.Spec)
DropDisabledFields(&psp.Spec, nil)
// check to make sure AllowedProcMountTypes is still present
// if featureset is set to true
@@ -52,7 +52,7 @@ func TestDropAlphaProcMountType(t *testing.T) {
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ProcMountType, false)()
// now test dropping the fields
DropDisabledFields(&psp.Spec)
DropDisabledFields(&psp.Spec, nil)
// check to make sure AllowedProcMountTypes is nil
// if featureset is set to false