From 9dc107e74974e4c096d110679fad874a6e28c967 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 9 May 2023 05:19:05 -0600 Subject: [PATCH] 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 --- test/e2e/play_kube_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index 2d82899ee9..99210783c6 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -2803,10 +2803,15 @@ var _ = Describe("Podman play kube", func() { kube.WaitWithDefaultTimeout() 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() - Expect(logs).Should(Exit(0)) - Expect(logs.ErrorToString()).To(ContainSubstring("Operation not permitted")) + Expect(logs).Should(Exit(0), "podman logs %s", ctrName) + Expect(logs.ErrorToString()).To(ContainSubstring("getcwd: Operation not permitted")) }) It("podman play kube seccomp pod level", func() {