summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-11-30 11:36:11 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-11-30 14:37:25 +0100
commit9a10e2124bb11027fc71db4c495c116277b8b7e3 (patch)
tree724af810246e9bef1232f997f3eb36547a57ad27 /test/system
parent8de68b170716dd1293c5a044f3e9cfd962fdbfb1 (diff)
downloadpodman-9a10e2124bb11027fc71db4c495c116277b8b7e3.tar.gz
podman-9a10e2124bb11027fc71db4c495c116277b8b7e3.tar.bz2
podman-9a10e2124bb11027fc71db4c495c116277b8b7e3.zip
systemd: replace multi-user with default.target
Replace `multi-user.target` with `default.target` across the code base. It seems like the multi-user one is not available for (rootless) users on F35 anymore is causing issues in all kinds of ways, for instance, enabling the podman.service or generated systemd units. Fixes: #12438 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/250-systemd.bats11
-rw-r--r--test/system/255-auto-update.bats2
2 files changed, 12 insertions, 1 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index 4757f7643..56d36934d 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -34,6 +34,12 @@ function service_setup() {
systemctl daemon-reload
+ # Also test enabling services (see #12438).
+ run systemctl enable "$SERVICE_NAME"
+ if [ $status -ne 0 ]; then
+ die "Error enabling systemd unit $SERVICE_NAME, output: $output"
+ fi
+
run systemctl start "$SERVICE_NAME"
if [ $status -ne 0 ]; then
die "Error starting systemd unit $SERVICE_NAME, output: $output"
@@ -53,6 +59,11 @@ function service_cleanup() {
die "Error stopping systemd unit $SERVICE_NAME, output: $output"
fi
+ run systemctl disable "$SERVICE_NAME"
+ if [ $status -ne 0 ]; then
+ die "Error disbling systemd unit $SERVICE_NAME, output: $output"
+ fi
+
if [[ -z "$status" ]]; then
run systemctl is-active "$SERVICE_NAME"
if [ $status -ne 0 ]; then
diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats
index 99211f304..7540270bd 100644
--- a/test/system/255-auto-update.bats
+++ b/test/system/255-auto-update.bats
@@ -366,7 +366,7 @@ Type=oneshot
ExecStart=/usr/bin/podman auto-update
[Install]
-WantedBy=multi-user.target default.target
+WantedBy=default.target
EOF
echo "podman-auto-update-$cname" >> $SNAME_FILE