summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-09-14 20:07:20 +0200
committerPaul Holzinger <paul.holzinger@web.de>2020-09-15 00:02:45 +0200
commit685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d (patch)
tree4fa4c75ac5fda857081bda64b1b308b15f69c104 /test
parentfd7cdb25027bb33c33eacb99f1a02838eca5d684 (diff)
downloadpodman-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')
-rw-r--r--test/e2e/wait_test.go20
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"}))
+ })
})