diff options
Diffstat (limited to 'test/system')
| -rw-r--r-- | test/system/220-healthcheck.bats | 9 | ||||
| -rw-r--r-- | test/system/250-systemd.bats | 1 | 
2 files changed, 6 insertions, 4 deletions
| diff --git a/test/system/220-healthcheck.bats b/test/system/220-healthcheck.bats index a1b24d293..8e14adcec 100644 --- a/test/system/220-healthcheck.bats +++ b/test/system/220-healthcheck.bats @@ -28,10 +28,11 @@ function _check_health {                 --health-cmd /healthcheck   \                 --health-interval 1s        \                 --health-retries 3          \ +               --health-on-failure=kill    \                 healthcheck_i      run_podman inspect healthcheck_c --format "{{.Config.HealthcheckOnFailureAction}}" -    is "$output" "none" "default on-failure action is none" +    is "$output" "kill" "on-failure action is set to kill"      # We can't check for 'starting' because a 1-second interval is too      # short; it could run healthcheck before we get to our first check. @@ -67,9 +68,8 @@ Log[-1].ExitCode | 1  Log[-1].Output   | \"Uh-oh on stdout!\\\nUh-oh on stderr!\"  " -    # healthcheck should now fail, with exit status 1 and 'unhealthy' output -    run_podman 1 healthcheck run healthcheck_c -    is "$output" "unhealthy" "output from 'podman healthcheck run'" +    # now the on-failure should kick in and kill the container +    podman wait healthcheck_c      # Clean up      run_podman rm -t 0 -f healthcheck_c @@ -95,6 +95,7 @@ Log[-1].Output   | \"Uh-oh on stdout!\\\nUh-oh on stderr!\"          # Run that healthcheck image.          run_podman run -d --name $ctr      \                 --health-cmd /healthcheck   \ +               --health-retries=1          \                 --health-on-failure=$policy \                 $img diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index ddec3a492..5526728b6 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -318,6 +318,7 @@ LISTEN_FDNAMES=listen_fdnames" | sort)      run_podman create --name $cname      \                 --health-cmd /healthcheck \                 --health-on-failure=kill  \ +               --health-retries=1        \                 --restart=on-failure      \                 $img | 
