Skip to content

Commit 8fbca19

Browse files
Jiawei0227mauriciopoppe
authored andcommitted
storege e2etest: Delete restored PVC/Pod in snapshottable
1 parent eb84221 commit 8fbca19

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/e2e/storage/testsuites/snapshottable.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,15 @@ func (s *snapshottableTestSuite) DefineTests(driver storageframework.TestDriver,
312312

313313
ginkgo.By("should delete the VolumeSnapshotContent according to its deletion policy")
314314

315-
// Delete both Snapshot and PVC at the same time because different storage systems
316-
// have different ordering of deletion. Some may require delete PVC first before
315+
// Delete both Snapshot and restored Pod/PVC at the same time because different storage systems
316+
// have different ordering of deletion. Some may require delete the restored PVC first before
317317
// Snapshot deletion and some are opposite.
318318
err = storageutils.DeleteSnapshotWithoutWaiting(dc, vs.GetNamespace(), vs.GetName())
319319
framework.ExpectNoError(err)
320+
framework.Logf("deleting restored pod %q/%q", restoredPod.Namespace, restoredPod.Name)
321+
err = cs.CoreV1().Pods(restoredPod.Namespace).Delete(context.TODO(), restoredPod.Name, metav1.DeleteOptions{})
322+
framework.ExpectNoError(err)
323+
framework.Logf("deleting restored PVC %q/%q", restoredPVC.Namespace, restoredPVC.Name)
320324
err = cs.CoreV1().PersistentVolumeClaims(restoredPVC.Namespace).Delete(context.TODO(), restoredPVC.Name, metav1.DeleteOptions{})
321325
framework.ExpectNoError(err)
322326

0 commit comments

Comments
 (0)