test/system: use DISABLE_HC_SYSTEMD for 2 tests

The problem is by default we create the systemd timers and run hc in the
background. This means any tests who depend on exact hc timing can get
broken by this so use the DISABLE_HC_SYSTEMD=true env which makes podman
skip creating the systemd timers but still allows you to manually run
the commands.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2026-05-28 12:56:40 +02:00
parent a2581cc82f
commit ea51ae7305
No known key found for this signature in database
GPG key ID: EB145DD938A3CAF2
2 changed files with 5 additions and 1 deletions

View file

@ -429,6 +429,8 @@ function _check_health_log {
msg="hc-msg-$(random_string)"
hcStatus=$PODMAN_TMPDIR/hcStatus
# Disable systemd healthcheck in the background as they mess up the timings of the manual commands.
export DISABLE_HC_SYSTEMD="true"
run_podman run -d --name $ctr \
--health-cmd "touch /tmp/abc; sleep 20; echo $msg" \
$IMAGE /home/podman/pause

View file

@ -55,6 +55,7 @@ function mv-safely() {
# Helper to start a systemd service running a container
function service_setup() {
local extra_args="$1"
# January 2024: we can no longer do "run_podman generate systemd" followed
# by "echo $output >file", because generate-systemd is deprecated and now
# says so loudly, to stderr, with no way to silence it. Since BATS gloms
@ -65,6 +66,7 @@ function service_setup() {
run_podman generate systemd --files --name \
-e http_proxy -e https_proxy -e no_proxy \
-e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY \
$extra_args \
--new $cname
mv-safely "container-$cname.service" $UNIT_FILE
)
@ -359,7 +361,7 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
$IMAGE /home/podman/pause
# run container in systemd unit
service_setup
service_setup "-e DISABLE_HC_SYSTEMD=true"
run_podman container inspect $cname --format "{{.ID}}"
oldID="$output"