summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-09-12 15:22:21 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-09-13 10:56:44 +0200
commitc8c2aab50d73ab767b8eb720b4d1abbc9bb36b62 (patch)
tree1b80152569dd43811ec19d40fbba4c22750a084d /test/system
parent1635fe8620fa454647cf7db2af9ed0c9b52eacfb (diff)
downloadpodman-c8c2aab50d73ab767b8eb720b4d1abbc9bb36b62.tar.gz
podman-c8c2aab50d73ab767b8eb720b4d1abbc9bb36b62.tar.bz2
podman-c8c2aab50d73ab767b8eb720b4d1abbc9bb36b62.zip
health checks: restart timers
Restart the health-check timers instead of starting them. This will surpress annoying errors stating that an already running timer cannot be started anymore. Also make sure that the transient units/timers are stopped and removed when stopping a container. Fixes: #15691 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/220-healthcheck.bats6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/system/220-healthcheck.bats b/test/system/220-healthcheck.bats
index 00ec1dd79..a1b24d293 100644
--- a/test/system/220-healthcheck.bats
+++ b/test/system/220-healthcheck.bats
@@ -106,8 +106,7 @@ 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 $ctr
- # FIXME: #15691 - `healthcheck run` may emit an error log that the timer already exists
- is "$output" ".*unhealthy.*" "output from 'podman healthcheck run'"
+ is "$output" "unhealthy" "output from 'podman healthcheck run'"
run_podman inspect $ctr --format "{{.State.Status}} {{.Config.HealthcheckOnFailureAction}}"
if [[ $policy == "restart" ]];then
@@ -118,8 +117,7 @@ Log[-1].Output | \"Uh-oh on stdout!\\\nUh-oh on stderr!\"
# Container is still running and health check still broken
is "$output" "running $policy" "container continued running"
run_podman 1 healthcheck run $ctr
- # FIXME: #15691 - `healthcheck run` may emit an error log that the timer already exists
- is "$output" ".*unhealthy.*" "output from 'podman healthcheck run'"
+ is "$output" "unhealthy" "output from 'podman healthcheck run'"
else
# kill and stop yield the container into a non-running state
is "$output" ".* $policy" "container was stopped/killed"