mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 12:48:51 +00:00
Move the provisioning test for retain policy back to volume_provisioning.go
Provisioning test for retain policy requires each driver's backend volume deletion logic. Without it, volume leakage happens. Move this test back to volume_provisioning.go and test it only for gce, until general backend volume deletion code for each driver becomes available. Fixes: #70191
This commit is contained in:
@@ -185,19 +185,6 @@ func testProvisioning(input *provisioningTestInput) {
|
||||
TestDynamicProvisioning(input.testCase, input.cs, input.pvc, input.sc)
|
||||
})
|
||||
|
||||
It("should provision storage with non-default reclaim policy Retain", func() {
|
||||
retain := v1.PersistentVolumeReclaimRetain
|
||||
input.sc.ReclaimPolicy = &retain
|
||||
pv := TestDynamicProvisioning(input.testCase, input.cs, input.pvc, input.sc)
|
||||
|
||||
By(fmt.Sprintf("waiting for the provisioned PV %q to enter phase %s", pv.Name, v1.VolumeReleased))
|
||||
framework.ExpectNoError(framework.WaitForPersistentVolumePhase(v1.VolumeReleased, input.cs, pv.Name, 1*time.Second, 30*time.Second))
|
||||
|
||||
By(fmt.Sprintf("deleting the PV %q", pv.Name))
|
||||
framework.ExpectNoError(framework.DeletePersistentVolume(input.cs, pv.Name), "Failed to delete PV ", pv.Name)
|
||||
framework.ExpectNoError(framework.WaitForPersistentVolumeDeleted(input.cs, pv.Name, 1*time.Second, 30*time.Second))
|
||||
})
|
||||
|
||||
It("should create and delete block persistent volumes [Feature:BlockVolume]", func() {
|
||||
if !input.dInfo.IsBlockSupported {
|
||||
framework.Skipf("Driver %q does not support BlockVolume - skipping", input.dInfo.Name)
|
||||
|
Reference in New Issue
Block a user