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: #68073
This commit is contained in:
Masaki Kimura 2018-08-30 15:11:27 +00:00
parent 58ead1c1e8
commit 69b9cf5ccc

View File

@ -589,7 +589,9 @@ func testPodContainerRestart(f *framework.Framework, pod *v1.Pod) {
By(fmt.Sprintf("Creating pod %s", pod.Name))
pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(pod)
Expect(err).ToNot(HaveOccurred(), "while creating pod")
defer func() {
framework.DeletePodWithWait(f, f.ClientSet, pod)
}()
err = framework.WaitForPodRunningInNamespace(f.ClientSet, pod)
Expect(err).ToNot(HaveOccurred(), "while waiting for pod to be running")