diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-28 09:02:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 09:02:14 -0400 |
commit | 7a748f028ccd175418b07c90ce05281eba899d2f (patch) | |
tree | e7fb174e509f722f76df53bc332f846e2ef0eb52 /test/system/270-socket-activation.bats | |
parent | f2ffb96eb317012e94258a242f6dc907acd22c40 (diff) | |
parent | 86083c580b101ba1fa580c574c66bcb25be20d7f (diff) | |
download | podman-7a748f028ccd175418b07c90ce05281eba899d2f.tar.gz podman-7a748f028ccd175418b07c90ce05281eba899d2f.tar.bz2 podman-7a748f028ccd175418b07c90ce05281eba899d2f.zip |
Merge pull request #11762 from edsantiago/bats
System tests: speed up. They've gotten too slow.
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 |