summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-12 08:51:53 -0400
committerMatthew Heon <mheon@redhat.com>2021-09-16 09:42:14 -0400
commitc6e4453f6223bbb2b6cfd5242c0d9af55cd8b121 (patch)
treeb3d6f7afeaf21f5a88216a96d572f4de8cdebf79 /test/e2e
parent5829d62ea0c08e358eb287636673316080d51001 (diff)
downloadpodman-c6e4453f6223bbb2b6cfd5242c0d9af55cd8b121.tar.gz
podman-c6e4453f6223bbb2b6cfd5242c0d9af55cd8b121.tar.bz2
podman-c6e4453f6223bbb2b6cfd5242c0d9af55cd8b121.zip
If container exits with 125 podman should exit with 125
fixes: https://github.com/containers/podman/issues/11540 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_exit_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go
index e86718577..6c39e5a1f 100644
--- a/test/e2e/run_exit_test.go
+++ b/test/e2e/run_exit_test.go
@@ -1,6 +1,7 @@
package integration
import (
+ "fmt"
"os"
"github.com/containers/podman/v3/libpod/define"
@@ -63,4 +64,10 @@ var _ = Describe("Podman run exit", func() {
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(50))
})
+
+ It("podman run exit 125", func() {
+ result := podmanTest.Podman([]string{"run", ALPINE, "sh", "-c", fmt.Sprintf("exit %d", define.ExecErrorCodeGeneric)})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(define.ExecErrorCodeGeneric))
+ })
})