summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-05 21:57:48 +0200
committerGitHub <noreply@github.com>2020-08-05 21:57:48 +0200
commitbae6d5ddafb9d293702fda368587caae22fc3c80 (patch)
tree3b4ef118cda4784020565d2bfbc6a51e13964f21 /test
parentd1aaf3362204f860267e2bb58ec419b25edc5800 (diff)
parent7a64ce35db378e69b813aab7f026f11fbaf7e7f9 (diff)
downloadpodman-bae6d5ddafb9d293702fda368587caae22fc3c80.tar.gz
podman-bae6d5ddafb9d293702fda368587caae22fc3c80.tar.bz2
podman-bae6d5ddafb9d293702fda368587caae22fc3c80.zip
Merge pull request #7236 from mheon/write_error_to_inspect
Ensure that exec errors write exit codes to the DB
Diffstat (limited to 'test')
-rw-r--r--test/e2e/exec_test.go3
-rw-r--r--test/system/075-exec.bats9
2 files changed, 9 insertions, 3 deletions
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index f5d15d3bd..055546f88 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -210,7 +210,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec missing working directory test", func() {
- Skip(v2remotefail)
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
@@ -225,7 +224,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec cannot be invoked", func() {
- Skip(v2remotefail)
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
@@ -236,7 +234,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec command not found", func() {
- Skip(v2remotefail)
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats
index b2c49510a..aa6e2bd28 100644
--- a/test/system/075-exec.bats
+++ b/test/system/075-exec.bats
@@ -19,6 +19,15 @@ load helpers
run_podman exec $cid sh -c "cat /$rand_filename"
is "$output" "$rand_content" "Can exec and see file in running container"
+
+ # Specially defined situations: exec a dir, or no such command.
+ # We don't check the full error message because runc & crun differ.
+ run_podman 126 exec $cid /etc
+ is "$output" ".*permission denied" "podman exec /etc"
+ run_podman 127 exec $cid /no/such/command
+ is "$output" ".*such file or dir" "podman exec /no/such/command"
+
+ # Done
run_podman exec $cid rm -f /$rand_filename
run_podman wait $cid