Skip to content

Commit 52febf6

Browse files
committed
Fix flake test: podman pause/unpause with HealthCheck interval
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: #25204 Signed-off-by: Jan Rodák <[email protected]>
1 parent 4b68b0f commit 52febf6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/system/080-pause.bats

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ load helpers.systemd
106106
run_podman healthcheck run $ctrname
107107
is "$output" "" "output from 'podman healthcheck run'"
108108

109-
run -0 systemctl status $cid-*.{service,timer}
109+
# We checking only timer because checking of service caused unexpected exit code 3 of systemctl status.
110+
# Since the status check can be executed when HealthCheck was exited, this caused a termination error code 3
111+
# for systemctl status. Because service was in dead state because HealthCheck exited.
112+
# https://github.com/containers/podman/issues/25204
113+
run -0 systemctl status $cid-*.timer
110114
assert "$output" =~ "active" "service should be running"
111115

112116
run_podman --noout pause $ctrname
@@ -121,7 +125,7 @@ load helpers.systemd
121125
run_podman healthcheck run $ctrname
122126
is "$output" "" "output from 'podman healthcheck run'"
123127

124-
run -0 systemctl status $cid-*.{service,timer}
128+
run -0 systemctl status $cid-*.timer
125129
assert "$output" =~ "active" "service should be running"
126130

127131
run_podman rm -t 0 -f $ctrname

0 commit comments

Comments
 (0)