Plumb old pod spec into DropDisabledFields methods

This commit is contained in:
Jordan Liggitt
2018-12-17 12:49:29 -05:00
parent 49028df5f9
commit e486d486b1
11 changed files with 88 additions and 40 deletions

View File

@@ -307,7 +307,7 @@ func TestDropAlphaVolumeDevices(t *testing.T) {
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.BlockVolume, true)()
// now test dropping the fields - should not be dropped
DropDisabledFields(&testPod.Spec)
DropDisabledFields(&testPod.Spec, nil)
// check to make sure VolumeDevices is still present
// if featureset is set to true
@@ -322,7 +322,7 @@ func TestDropAlphaVolumeDevices(t *testing.T) {
defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.BlockVolume, false)()
// now test dropping the fields
DropDisabledFields(&testPod.Spec)
DropDisabledFields(&testPod.Spec, nil)
// check to make sure VolumeDevices is nil
// if featureset is set to false