e2e: logs test: fix flakes

Yet another case of missing podman-wait. In these two, I see
no reason to run containers detached, so I just removed "-d"

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2023-05-10 04:53:44 -06:00
parent c307aeba37
commit 14001ad48a

View File

@ -566,11 +566,11 @@ var _ = Describe("Podman logs", func() {
testPod.WaitWithDefaultTimeout() testPod.WaitWithDefaultTimeout()
Expect(testPod).To(Exit(0)) Expect(testPod).To(Exit(0))
log1 := podmanTest.Podman([]string{"run", "--name", containerName1, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log1"}) log1 := podmanTest.Podman([]string{"run", "--name", containerName1, "--pod", podName, BB, "/bin/sh", "-c", "echo log1"})
log1.WaitWithDefaultTimeout() log1.WaitWithDefaultTimeout()
Expect(log1).To(Exit(0)) Expect(log1).To(Exit(0))
log2 := podmanTest.Podman([]string{"run", "--name", containerName2, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log2"}) log2 := podmanTest.Podman([]string{"run", "--name", containerName2, "--pod", podName, BB, "/bin/sh", "-c", "echo log2"})
log2.WaitWithDefaultTimeout() log2.WaitWithDefaultTimeout()
Expect(log2).To(Exit(0)) Expect(log2).To(Exit(0))
@ -591,10 +591,10 @@ var _ = Describe("Podman logs", func() {
testPod := podmanTest.Podman([]string{"pod", "create", fmt.Sprintf("--name=%s", podName)}) testPod := podmanTest.Podman([]string{"pod", "create", fmt.Sprintf("--name=%s", podName)})
testPod.WaitWithDefaultTimeout() testPod.WaitWithDefaultTimeout()
Expect(testPod).To(Exit(0)) Expect(testPod).To(Exit(0))
log1 := podmanTest.Podman([]string{"run", "--name", containerName1, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log1"}) log1 := podmanTest.Podman([]string{"run", "--name", containerName1, "--pod", podName, BB, "/bin/sh", "-c", "echo log1"})
log1.WaitWithDefaultTimeout() log1.WaitWithDefaultTimeout()
Expect(log1).To(Exit(0)) Expect(log1).To(Exit(0))
log2 := podmanTest.Podman([]string{"run", "--name", containerName2, "-d", "--pod", podName, BB, "/bin/sh", "-c", "echo log2"}) log2 := podmanTest.Podman([]string{"run", "--name", containerName2, "--pod", podName, BB, "/bin/sh", "-c", "echo log2"})
log2.WaitWithDefaultTimeout() log2.WaitWithDefaultTimeout()
Expect(log2).To(Exit(0)) Expect(log2).To(Exit(0))
results := podmanTest.Podman([]string{"pod", "logs", "--color", podName}) results := podmanTest.Podman([]string{"pod", "logs", "--color", podName})