summaryrefslogtreecommitdiff
path: root/test/e2e/wait_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/wait_test.go')
-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"}))
+ })
})