aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBoaz Shuster <boaz.shuster.github@gmail.com>2022-09-20 12:11:39 +0300
committerBoaz Shuster <boaz.shuster.github@gmail.com>2022-09-20 22:52:45 +0300
commit7cfe0328f1c231ed318c38938479f7dec7fc97fa (patch)
tree8b0bfcfe8fbc9e7af30cfcb84b567293b03f40f6 /test
parent30231d0da7e6dcf3d6d1f45b10150baae35aaf28 (diff)
downloadpodman-7cfe0328f1c231ed318c38938479f7dec7fc97fa.tar.gz
podman-7cfe0328f1c231ed318c38938479f7dec7fc97fa.tar.bz2
podman-7cfe0328f1c231ed318c38938479f7dec7fc97fa.zip
Add support to sig-proxy for podman-remote
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/032-sig-proxy.bats43
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