Skip to content

Commit 69b9cf5

Browse files
committed
Fix subpath tests not to fail in namespace deletion
This commit fixes below subpath test not to fail in namespace deletion - subPath should support restarting containers using directory as subpath - subPath should support restarting containers using file as subpath Fixes: kubernetes#68073
1 parent 58ead1c commit 69b9cf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/e2e/storage/testsuites/subpath.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ func testPodContainerRestart(f *framework.Framework, pod *v1.Pod) {
589589
By(fmt.Sprintf("Creating pod %s", pod.Name))
590590
pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(pod)
591591
Expect(err).ToNot(HaveOccurred(), "while creating pod")
592-
592+
defer func() {
593+
framework.DeletePodWithWait(f, f.ClientSet, pod)
594+
}()
593595
err = framework.WaitForPodRunningInNamespace(f.ClientSet, pod)
594596
Expect(err).ToNot(HaveOccurred(), "while waiting for pod to be running")
595597

0 commit comments

Comments
 (0)