mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
podman wait accept args > 1
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
@ -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"}))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user