diff --git a/test/system/220-healthcheck.bats b/test/system/220-healthcheck.bats index d5a3d23e5e..200bad33bf 100644 --- a/test/system/220-healthcheck.bats +++ b/test/system/220-healthcheck.bats @@ -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 diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index 614185dbab..23e3abc1fa 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -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"