diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2020-09-14 20:07:20 +0200 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2020-09-15 00:02:45 +0200 |
commit | 685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d (patch) | |
tree | 4fa4c75ac5fda857081bda64b1b308b15f69c104 /test/e2e | |
parent | fd7cdb25027bb33c33eacb99f1a02838eca5d684 (diff) | |
download | podman-685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d.tar.gz podman-685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d.tar.bz2 podman-685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d.zip |
podman wait accept args > 1
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/wait_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
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"})) + }) }) |