diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-22 17:06:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 17:06:45 +0200 |
commit | 8bf3535447fe9f482b329e962e173ade26456e6d (patch) | |
tree | 39375c55d8bda145631c4d739fdf3013945b8ad1 /test/system | |
parent | 828fae12971c5a7b9807c8c4f8e029fe5d0ddc2f (diff) | |
parent | 7cfe0328f1c231ed318c38938479f7dec7fc97fa (diff) | |
download | podman-8bf3535447fe9f482b329e962e173ade26456e6d.tar.gz podman-8bf3535447fe9f482b329e962e173ade26456e6d.tar.bz2 podman-8bf3535447fe9f482b329e962e173ade26456e6d.zip |
Merge pull request #15131 from boaz0/closes_14707
Add support to sig-proxy for podman-remote
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/032-sig-proxy.bats | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/system/032-sig-proxy.bats b/test/system/032-sig-proxy.bats new file mode 100644 index 000000000..686df0e1b --- /dev/null +++ b/test/system/032-sig-proxy.bats @@ -0,0 +1,43 @@ +#!/usr/bin/env bats + +load helpers + +@test "podman sigkill" { + $PODMAN run -i --name foo $IMAGE sh -c 'trap "echo BYE;exit 0" INT;echo READY;while :;do sleep 0.1;done' & + local kidpid=$! + + # Wait for container to appear + local timeout=5 + while :;do + sleep 0.5 + run_podman '?' container exists foo + if [[ $status -eq 0 ]]; then + break + fi + timeout=$((timeout - 1)) + if [[ $timeout -eq 0 ]]; then + die "Timed out waiting for container to start" + fi + done + + wait_for_ready foo + + # Signal, and wait for container to exit + kill -INT $kidpid + local timeout=5 + while :;do + sleep 0.5 + run_podman logs foo + if [[ "$output" =~ BYE ]]; then + break + fi + timeout=$((timeout - 1)) + if [[ $timeout -eq 0 ]]; then + die "Timed out waiting for BYE from container" + fi + done + + run_podman rm -f -t0 foo +} + +# vim: filetype=sh |