File tree Expand file tree Collapse file tree
pkg/controller/volume/persistentvolume Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -720,14 +720,9 @@ func TestSyncAlphaBlockVolume(t *testing.T) {
720720 t .Errorf ("Failed to enable feature gate for BlockVolume: %v" , err )
721721 return
722722 }
723+ defer utilfeature .DefaultFeatureGate .Set ("BlockVolume=false" )
723724
724725 runSyncTests (t , tests , []* storage.StorageClass {})
725-
726- err1 := utilfeature .DefaultFeatureGate .Set ("BlockVolume=false" )
727- if err1 != nil {
728- t .Errorf ("Failed to disable feature gate for BlockVolume: %v" , err )
729- return
730- }
731726}
732727
733728// Test multiple calls to syncClaim/syncVolume and periodic sync of all
Original file line number Diff line number Diff line change @@ -839,6 +839,8 @@ func TestAlphaVolumeModeCheck(t *testing.T) {
839839 }
840840 }
841841
842+ // make sure feature gate is turned off
843+ toggleBlockVolumeFeature (false , t )
842844}
843845
844846func TestAlphaFilteringVolumeModes (t * testing.T ) {
@@ -933,6 +935,9 @@ func TestAlphaFilteringVolumeModes(t *testing.T) {
933935 t .Errorf ("Unexpected failure for scenario: %s - %+v" , name , err )
934936 }
935937 }
938+
939+ // make sure feature gate is turned off
940+ toggleBlockVolumeFeature (false , t )
936941}
937942
938943func TestFindingPreboundVolumes (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments