summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-11 13:31:39 +0000
committerGitHub <noreply@github.com>2022-07-11 13:31:39 +0000
commitea2c31c98893c6e9e907bf3661d4456c886575bd (patch)
tree105eb331e91d038422cbdcc82bd5b6f981ee33b6 /test/system
parent0af75a74d27c1d37009ba49f7fce11ff188954eb (diff)
parent3bb4cf8ee2ca4d2b5fcd16da95a6ebd60b9ed18b (diff)
downloadpodman-ea2c31c98893c6e9e907bf3661d4456c886575bd.tar.gz
podman-ea2c31c98893c6e9e907bf3661d4456c886575bd.tar.bz2
podman-ea2c31c98893c6e9e907bf3661d4456c886575bd.zip
Merge pull request #14874 from vrothberg/fix-14859
exit code improvements
Diffstat (limited to 'test/system')
-rw-r--r--test/system/130-kill.bats13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/system/130-kill.bats b/test/system/130-kill.bats
index 96b633a42..7522c475d 100644
--- a/test/system/130-kill.bats
+++ b/test/system/130-kill.bats
@@ -133,11 +133,22 @@ load helpers
@test "podman kill - concurrent stop" {
# 14761 - concurrent kill/stop must record the exit code
random_name=$(random_string 10)
- run_podman run -d --replace --name=$random_name alpine sh -c "trap 'echo Received SIGTERM, ignoring' SIGTERM; echo READY; while :; do sleep 0.2; done"
+ run_podman run -d --replace --name=$random_name $IMAGE sh -c "trap 'echo Received SIGTERM, ignoring' SIGTERM; echo READY; while :; do sleep 0.2; done"
$PODMAN stop -t 1 $random_name &
run_podman kill $random_name
run_podman wait $random_name
run_podman rm -f $random_name
}
+@test "podman wait - exit codes" {
+ random_name=$(random_string 10)
+ run_podman create --name=$random_name $IMAGE /no/such/command
+ # Container never ran -> exit code == 0
+ run_podman wait $random_name
+ # Container did not start successfully -> exit code != 0
+ run_podman 125 start $random_name
+ # FIXME(#14873): while older Podmans return 0 on wait, Docker does not.
+ run_podman wait $random_name
+}
+
# vim: filetype=sh