summaryrefslogtreecommitdiff
path: root/test/e2e/run_exit_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-09-07 05:40:45 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2019-09-12 16:20:01 -0400
commit535111b5d5cfa0d203df77e6d6b0b69eda46bb82 (patch)
treea22a31672391f8d2235fccaa891162a6f9467e7e /test/e2e/run_exit_test.go
parentaf8fedcc78674d71d43ca3000438c42b7b6b6994 (diff)
downloadpodman-535111b5d5cfa0d203df77e6d6b0b69eda46bb82.tar.gz
podman-535111b5d5cfa0d203df77e6d6b0b69eda46bb82.tar.bz2
podman-535111b5d5cfa0d203df77e6d6b0b69eda46bb82.zip
Use exit code constants
We have leaked the exit number codess all over the code, this patch removes the numbers to constants. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/run_exit_test.go')
-rw-r--r--test/e2e/run_exit_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go
index 861d6b3b7..fc8b52120 100644
--- a/test/e2e/run_exit_test.go
+++ b/test/e2e/run_exit_test.go
@@ -5,6 +5,7 @@ package integration
import (
"os"
+ "github.com/containers/libpod/libpod/define"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -34,22 +35,22 @@ var _ = Describe("Podman run exit", func() {
})
- It("podman run exit 125", func() {
+ It("podman run exit define.ExecErrorCodeGeneric", func() {
result := podmanTest.Podman([]string{"run", "--foobar", ALPINE, "ls", "$tmp"})
result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(125))
+ Expect(result.ExitCode()).To(Equal(define.ExecErrorCodeGeneric))
})
- It("podman run exit 126", func() {
+ It("podman run exit ExecErrorCodeCannotInvoke", func() {
result := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(126))
+ Expect(result.ExitCode()).To(Equal(define.ExecErrorCodeCannotInvoke))
})
- It("podman run exit 127", func() {
+ It("podman run exit ExecErrorCodeNotFound", func() {
result := podmanTest.Podman([]string{"run", ALPINE, "foobar"})
result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(127))
+ Expect(result.ExitCode()).To(Equal(define.ExecErrorCodeNotFound))
})
It("podman run exit 0", func() {