summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-03 11:49:04 -0400
committerGitHub <noreply@github.com>2020-08-03 11:49:04 -0400
commit1709335cf04e947117d4ae4dca72f24f4095511b (patch)
tree7b3c39b01401b037b90fcef04d5222d30353bc12 /test
parent2e3928ee1740c0eb2564ea6bb3004ad5b698ff8f (diff)
parenta5a0ba9cb49a5a311fb0e9245f5bc8e0a35656ba (diff)
downloadpodman-1709335cf04e947117d4ae4dca72f24f4095511b.tar.gz
podman-1709335cf04e947117d4ae4dca72f24f4095511b.tar.bz2
podman-1709335cf04e947117d4ae4dca72f24f4095511b.zip
Merge pull request #7182 from zhangguanzhang/fix-exitCode-for-start
implement the exitcode when start a container with attach
Diffstat (limited to 'test')
-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()