diff options
Diffstat (limited to 'test/system/250-systemd.bats')
-rw-r--r-- | test/system/250-systemd.bats | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index 3f6296b36..ddec3a492 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -34,9 +34,8 @@ function teardown() { # Helper to start a systemd service running a container function service_setup() { run_podman generate systemd \ - -e http_proxy -e HTTP_PROXY \ - -e https_proxy -e HTTPS_PROXY \ - -e no_proxy -e NO_PROXY \ + -e http_proxy -e https_proxy -e no_proxy \ + -e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY \ --new $cname echo "$output" > "$UNIT_FILE" run_podman rm $cname @@ -82,6 +81,13 @@ function service_cleanup() { skip "FIXME: 2022-09-01: requires conmon-2.1.4, ubuntu has 2.1.3" fi + # Warn when a custom restart policy is used without --new (see #15284) + run_podman create --restart=always $IMAGE + cid="$output" + run_podman generate systemd $cid + is "$output" ".*Container $cid has restart policy .*always.* which can lead to issues on shutdown.*" "generate systemd emits warning" + run_podman rm -f $cid + cname=$(random_string) # See #7407 for --pull=always. run_podman create --pull=always --name $cname --label "io.containers.autoupdate=registry" $IMAGE \ |