diff options
author | zhangguanzhang <zhangguanzhang@qq.com> | 2020-08-01 23:37:41 +0800 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-08-11 12:15:24 +0200 |
commit | 85d7cb5fd42642b26b0fe3c98f165c081b41c45e (patch) | |
tree | 463a6f3a72500090ab9b800f75f08bc948621ecc /test | |
parent | d6442f5f571112d66fd62309a2e8e15c163ff4f3 (diff) | |
download | podman-85d7cb5fd42642b26b0fe3c98f165c081b41c45e.tar.gz podman-85d7cb5fd42642b26b0fe3c98f165c081b41c45e.tar.bz2 podman-85d7cb5fd42642b26b0fe3c98f165c081b41c45e.zip |
implement the exitcode when start a container with attach
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/start_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go index 761b1c4ca..3cc1668e7 100644 --- a/test/e2e/start_test.go +++ b/test/e2e/start_test.go @@ -86,6 +86,18 @@ var _ = Describe("Podman start", func() { Expect(session.OutputToString()).To(Equal(name)) }) + It("podman start single container with attach and test the signal", func() { + SkipIfRemote() + session := podmanTest.Podman([]string{"create", "--entrypoint", "sh", ALPINE, "-c", "exit 1"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + cid := session.OutputToString() + session = podmanTest.Podman([]string{"start", "--attach", cid}) + session.WaitWithDefaultTimeout() + // It should forward the signal + Expect(session.ExitCode()).To(Equal(1)) + }) + It("podman start multiple containers", func() { session := podmanTest.Podman([]string{"create", "-d", "--name", "foobar99", ALPINE, "ls"}) session.WaitWithDefaultTimeout() |