e2e: fix race in a play-kube test

Yet another case where tests expect play-kube to be synchronous.
There are probably dozens more of these.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2023-05-09 05:19:05 -06:00
parent edcb29b19f
commit 9dc107e749

View File

@ -2803,10 +2803,15 @@ var _ = Describe("Podman play kube", func() {
kube.WaitWithDefaultTimeout() kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0)) Expect(kube).Should(Exit(0))
logs := podmanTest.Podman([]string{"logs", getCtrNameInPod(pod)}) ctrName := getCtrNameInPod(pod)
wait := podmanTest.Podman([]string{"wait", ctrName})
wait.WaitWithDefaultTimeout()
Expect(wait).Should(Exit(0), "podman wait %s", ctrName)
logs := podmanTest.Podman([]string{"logs", ctrName})
logs.WaitWithDefaultTimeout() logs.WaitWithDefaultTimeout()
Expect(logs).Should(Exit(0)) Expect(logs).Should(Exit(0), "podman logs %s", ctrName)
Expect(logs.ErrorToString()).To(ContainSubstring("Operation not permitted")) Expect(logs.ErrorToString()).To(ContainSubstring("getcwd: Operation not permitted"))
}) })
It("podman play kube seccomp pod level", func() { It("podman play kube seccomp pod level", func() {