summaryrefslogtreecommitdiff
path: root/test/system/250-systemd.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-30 17:09:33 +0100
committerGitHub <noreply@github.com>2021-11-30 17:09:33 +0100
commit3fac03cf04e68eb3351aff8c33bac6bea85810f6 (patch)
treef83b1980c62a066edba6fce7cd4f5b2649659bd7 /test/system/250-systemd.bats
parent771f8c628bef17eb183efce8c7ee7a91cbf4087b (diff)
parent9a10e2124bb11027fc71db4c495c116277b8b7e3 (diff)
downloadpodman-3fac03cf04e68eb3351aff8c33bac6bea85810f6.tar.gz
podman-3fac03cf04e68eb3351aff8c33bac6bea85810f6.tar.bz2
podman-3fac03cf04e68eb3351aff8c33bac6bea85810f6.zip
Merge pull request #12449 from vrothberg/fix-12438
systemd: replace multi-user with default.target
Diffstat (limited to 'test/system/250-systemd.bats')
-rw-r--r--test/system/250-systemd.bats11
1 files changed, 11 insertions, 0 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