diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-30 08:35:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 08:35:07 -0400 |
commit | d8bdbf5b66c860a73f5d4e301535c0ee40d8d719 (patch) | |
tree | ee5e4c6705632064406f49147d2e5fb51947d300 /test/system/270-socket-activation.bats | |
parent | f0ae84f5120f7ec8d2fc16c6ae9e52725b5d4958 (diff) | |
parent | 855746cc9258b85d390d68cd3c61ca0588dd0f8f (diff) | |
download | podman-d8bdbf5b66c860a73f5d4e301535c0ee40d8d719.tar.gz podman-d8bdbf5b66c860a73f5d4e301535c0ee40d8d719.tar.bz2 podman-d8bdbf5b66c860a73f5d4e301535c0ee40d8d719.zip |
Merge pull request #11792 from mheon/340_final
Backports + release notes for v3.4.0 final
Diffstat (limited to 'test/system/270-socket-activation.bats')
-rw-r--r-- | test/system/270-socket-activation.bats | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/test/system/270-socket-activation.bats b/test/system/270-socket-activation.bats index 031ba161b..dd439d3ae 100644 --- a/test/system/270-socket-activation.bats +++ b/test/system/270-socket-activation.bats @@ -69,26 +69,36 @@ function teardown() { @test "podman system service - socket activation - no container" { run curl -s --max-time 3 --unix-socket $SERVICE_SOCK_ADDR http://podman/libpod/_ping - is "$output" "OK" "podman service responses normally" + is "$output" "OK" "podman service responds normally" } -@test "podman system service - socket activation - exist container " { - run_podman run $IMAGE sleep 90 +@test "podman system service - socket activation - existing container" { + run_podman run -d $IMAGE sleep 90 + cid="$output" + run curl -s --max-time 3 --unix-socket $SERVICE_SOCK_ADDR http://podman/libpod/_ping - is "$output" "OK" "podman service responses normally" + is "$output" "OK" "podman service responds normally" + + run_podman stop -t 0 $cid + run_podman rm -f $cid } -@test "podman system service - socket activation - kill rootless pause " { +@test "podman system service - socket activation - kill rootless pause" { if ! is_rootless; then skip "root podman no need pause process" fi - run_podman run $IMAGE sleep 90 + run_podman run -d $IMAGE sleep 90 + cid="$output" + local pause_pid="$XDG_RUNTIME_DIR/libpod/tmp/pause.pid" if [ -f $pause_pid ]; then kill -9 $(cat $pause_pid) 2> /dev/null fi run curl -s --max-time 3 --unix-socket $SERVICE_SOCK_ADDR http://podman/libpod/_ping - is "$output" "OK" "podman service responses normally" + is "$output" "OK" "podman service responds normally" + + run_podman stop -t 0 $cid + run_podman rm -f $cid } # vim: filetype=sh |