summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-08-01 23:37:41 +0800
committerzhangguanzhang <zhangguanzhang@qq.com>2020-08-03 21:40:06 +0800
commita5a0ba9cb49a5a311fb0e9245f5bc8e0a35656ba (patch)
tree1b7e705ed7518f40511f2a03eecf2ee27e64ba9e /test/e2e
parentb4fa2c2517fd313bb0000f7697274d2ab2498265 (diff)
downloadpodman-a5a0ba9cb49a5a311fb0e9245f5bc8e0a35656ba.tar.gz
podman-a5a0ba9cb49a5a311fb0e9245f5bc8e0a35656ba.tar.bz2
podman-a5a0ba9cb49a5a311fb0e9245f5bc8e0a35656ba.zip
implement the exitcode when start a container with attach
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/start_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go
index 78410c9cf..aef5ca001 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()