summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-13 18:12:25 +0200
committerGitHub <noreply@github.com>2019-09-13 18:12:25 +0200
commit7875e00c663a42dd26c99889206cdb8f16ff0905 (patch)
tree7ce115ad37c16634a8c4d42e0d0c89ae3002b3bf /test
parent5c09c4d2947a759724f9d5aef6bac04317e03f7e (diff)
parent82ac0d8925dbb5aa738f1494ecb002eb6daca992 (diff)
downloadpodman-7875e00c663a42dd26c99889206cdb8f16ff0905.tar.gz
podman-7875e00c663a42dd26c99889206cdb8f16ff0905.tar.bz2
podman-7875e00c663a42dd26c99889206cdb8f16ff0905.zip
Merge pull request #3934 from rhatdan/wait
Podman-remote run should wait for exit code
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_exit_test.go15
-rw-r--r--test/e2e/run_selinux_test.go2
-rw-r--r--test/system/030-run.bats1
3 files changed, 8 insertions, 10 deletions
diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go
index 861d6b3b7..374705879 100644
--- a/test/e2e/run_exit_test.go
+++ b/test/e2e/run_exit_test.go
@@ -1,10 +1,9 @@
-// +build !remoteclient
-
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 +33,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() {
diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go
index dfe71531a..0c78ab15b 100644
--- a/test/e2e/run_selinux_test.go
+++ b/test/e2e/run_selinux_test.go
@@ -162,7 +162,7 @@ var _ = Describe("Podman run", func() {
session = podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:foobar", fedoraMinimal, "ls", "-Z", "/dev"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(127))
+ Expect(session.ExitCode()).To(Equal(126))
})
})
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index f279a0c75..760ed6a18 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -60,7 +60,6 @@ echo $rand | 0 | $rand
# 'run --rm' goes through different code paths and may lose exit status.
# See https://github.com/containers/libpod/issues/3795
@test "podman run --rm" {
- skip_if_remote "podman-remote does not handle exit codes"
run_podman 0 run --rm $IMAGE /bin/true
run_podman 1 run --rm $IMAGE /bin/false