Skip to content

Commit 90fed8e

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#68074 from mkimuram/issue/68073
Automatic merge from submit-queue (batch tested with PRs 67368, 59930, 68074). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Fix subpath tests not to fail in namespace deletion **What this PR does / why we need it**: This PR 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 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes: kubernetes#68073 **Special notes for your reviewer**: /sig storage /sig testing **Release note**: ```release-note NONE ```
2 parents cfdefff + 69b9cf5 commit 90fed8e

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)