summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-06-07 11:59:07 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-07 21:32:39 +0000
commit1cbce851fa0315c147ba02afccd5a2899b5e5c5a (patch)
treed989b857d5f2dcfe9fdf4fc7925c4162a841094a
parentd7f9781bd6cef1373227585bb3b71f557b818822 (diff)
downloadpodman-1cbce851fa0315c147ba02afccd5a2899b5e5c5a.tar.gz
podman-1cbce851fa0315c147ba02afccd5a2899b5e5c5a.tar.bz2
podman-1cbce851fa0315c147ba02afccd5a2899b5e5c5a.zip
Test to make sure we are getting proper exit codes on podman run
podman run command screws up we should get 125 podman run command succeeds but command in container fails to exec 126 podman run command succeeds but command exits with non 0 exit code Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #921 Approved by: TomSweeneyRedHat
-rw-r--r--test/e2e/run_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 759c292eb..34ed55941 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -465,4 +465,15 @@ var _ = Describe("Podman run", func() {
Expect(session.ExitCode()).To(Equal(125))
})
+ It("podman run exit code on failure to exec", func() {
+ session := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(126))
+ })
+
+ It("podman run error on exec", func() {
+ session := podmanTest.Podman([]string{"run", ALPINE, "sh", "-c", "exit 100"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(100))
+ })
})