mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Fix deletion protection unit test
The test should not depend on current set of default feature gates, it should always ensure the ones necessary for the tests are set.
This commit is contained in:
parent
c98b388a84
commit
bb8157d780
@ -678,6 +678,9 @@ func TestAnnealMigrationAnnotations(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUpdateFinalizer(t *testing.T) {
|
||||
// This set of tests ensures that protection finalizer is removed when CSI migration is disabled
|
||||
// and PV controller needs to remove finalizers added by the external-provisioner.
|
||||
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.CSIMigrationGCE, false)()
|
||||
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)()
|
||||
const gcePlugin = "kubernetes.io/gce-pd"
|
||||
const gceDriver = "pd.csi.storage.gke.io"
|
||||
|
Loading…
Reference in New Issue
Block a user