Merge pull request #106376 from jsafrane/stabilize-unit-test

Fix deletion protection unit test
This commit is contained in:
Kubernetes Prow Robot 2021-11-15 13:04:48 -08:00 committed by GitHub
commit ce98eda406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"