From 52febf6a0acd113bc24fa33ad06388e6fd09ed01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Rod=C3=A1k?= Date: Tue, 4 Feb 2025 11:20:09 +0100 Subject: [PATCH] Fix flake test: podman pause/unpause with HealthCheck interval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Checking of service and timer caused unexpected exit code `3` of `systemctl status`. Since the status check can be executed when HealthCheck was exited, this caused a termination error code `3` for `systemctl status`. Because service was in dead state because HealthCheck exited. Fixes: https://github.com/containers/podman/issues/25204 Signed-off-by: Jan Rodák --- test/system/080-pause.bats | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/system/080-pause.bats b/test/system/080-pause.bats index c818d0849a..99e2a847f2 100644 --- a/test/system/080-pause.bats +++ b/test/system/080-pause.bats @@ -106,7 +106,11 @@ load helpers.systemd run_podman healthcheck run $ctrname is "$output" "" "output from 'podman healthcheck run'" - run -0 systemctl status $cid-*.{service,timer} + # We checking only timer because checking of service caused unexpected exit code 3 of systemctl status. + # Since the status check can be executed when HealthCheck was exited, this caused a termination error code 3 + # for systemctl status. Because service was in dead state because HealthCheck exited. + # https://github.com/containers/podman/issues/25204 + run -0 systemctl status $cid-*.timer assert "$output" =~ "active" "service should be running" run_podman --noout pause $ctrname @@ -121,7 +125,7 @@ load helpers.systemd run_podman healthcheck run $ctrname is "$output" "" "output from 'podman healthcheck run'" - run -0 systemctl status $cid-*.{service,timer} + run -0 systemctl status $cid-*.timer assert "$output" =~ "active" "service should be running" run_podman rm -t 0 -f $ctrname