From 685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 14 Sep 2020 20:07:20 +0200 Subject: podman wait accept args > 1 Signed-off-by: Paul Holzinger --- test/e2e/wait_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/e2e/wait_test.go b/test/e2e/wait_test.go index 3758acab8..4f0129a47 100644 --- a/test/e2e/wait_test.go +++ b/test/e2e/wait_test.go @@ -64,6 +64,7 @@ var _ = Describe("Podman wait", func() { session = podmanTest.Podman([]string{"wait", "-l"}) session.Wait(20) }) + It("podman container wait on latest container", func() { session := podmanTest.Podman([]string{"container", "run", "-d", ALPINE, "sleep", "1"}) session.Wait(20) @@ -71,4 +72,23 @@ var _ = Describe("Podman wait", func() { session = podmanTest.Podman([]string{"container", "wait", "-l"}) session.Wait(20) }) + + It("podman wait on three containers", func() { + session := podmanTest.Podman([]string{"run", "-d", ALPINE, "sleep", "1"}) + session.Wait(20) + Expect(session.ExitCode()).To(Equal(0)) + cid1 := session.OutputToString() + session = podmanTest.Podman([]string{"run", "-d", ALPINE, "sleep", "1"}) + session.Wait(20) + Expect(session.ExitCode()).To(Equal(0)) + cid2 := session.OutputToString() + session = podmanTest.Podman([]string{"run", "-d", ALPINE, "sleep", "1"}) + session.Wait(20) + Expect(session.ExitCode()).To(Equal(0)) + cid3 := session.OutputToString() + session = podmanTest.Podman([]string{"wait", cid1, cid2, cid3}) + session.Wait(20) + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToStringArray()).To(Equal([]string{"0", "0", "0"})) + }) }) -- cgit v1.2.3-54-g00ecf