diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-14 23:09:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 23:09:14 -0400 |
commit | 5c47a331ba768d57ef94b9595415500f4e911964 (patch) | |
tree | 4fa4c75ac5fda857081bda64b1b308b15f69c104 /test/e2e/wait_test.go | |
parent | fd7cdb25027bb33c33eacb99f1a02838eca5d684 (diff) | |
parent | 685ef847dd9dc117cafa2ed2217d4d66d0fc4b6d (diff) | |
download | podman-5c47a331ba768d57ef94b9595415500f4e911964.tar.gz podman-5c47a331ba768d57ef94b9595415500f4e911964.tar.bz2 podman-5c47a331ba768d57ef94b9595415500f4e911964.zip |
Merge pull request #7630 from Luap99/wait-n-args
podman wait accept args > 1
Diffstat (limited to 'test/e2e/wait_test.go')
-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"})) + }) }) |