mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
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:
parent
a2581cc82f
commit
ea51ae7305
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue