mirror of https://github.com/k3s-io/k3s
Merge pull request #44180 from copejon/fix-improper-pd-cleanup
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180) move PD delete to AfterEach **What this PR does / why we need it**: Fixes a bug in PersistentVolume E2E that causes GCEPDs to be left un-deleted after a test ends. ```release-note None ```pull/6/head
commit
5e442a3f61
|
@ -107,13 +107,10 @@ var _ = framework.KubeDescribe("PersistentVolumes:GCEPD [Volume]", func() {
|
|||
framework.DeletePodWithWait(f, c, clientPod)
|
||||
framework.PVPVCCleanup(c, ns, pv, pvc)
|
||||
clientPod, pv, pvc, node = nil, nil, nil, ""
|
||||
}
|
||||
})
|
||||
|
||||
AddCleanupAction(func() {
|
||||
if len(diskName) > 0 {
|
||||
if diskName != "" {
|
||||
framework.DeletePDWithRetry(diskName)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Attach a persistent disk to a pod using a PVC.
|
||||
|
|
Loading…
Reference in New Issue