teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0451-test-add-some-basic-testing-that-systemctl-start-T-d.patch

8be66a
From f31afbfd2fa68e20a10a8432fb4714a6d4e1170a Mon Sep 17 00:00:00 2001
8be66a
From: Lennart Poettering <lennart@poettering.net>
8be66a
Date: Tue, 26 Mar 2019 17:39:36 +0100
8be66a
Subject: [PATCH] test: add some basic testing that "systemctl start -T" does
8be66a
 something
8be66a
8be66a
(cherry picked from commit f087c7e072bb338d5c7c0781c9fbc900612efd18)
8be66a
8be66a
Related: #846319
8be66a
---
8be66a
 test/TEST-03-JOBS/test-jobs.sh | 7 +++++++
8be66a
 1 file changed, 7 insertions(+)
8be66a
8be66a
diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh
8be66a
index e66ea53621..42190cf478 100755
8be66a
--- a/test/TEST-03-JOBS/test-jobs.sh
8be66a
+++ b/test/TEST-03-JOBS/test-jobs.sh
8be66a
@@ -26,6 +26,13 @@ grep 'sleep\.service.*running' /root/list-jobs.txt
8be66a
 grep 'hello\.service' /root/list-jobs.txt && exit 1
8be66a
 systemctl stop sleep.service hello-after-sleep.target
8be66a
 
8be66a
+# Some basic testing that --show-transaction does something useful
8be66a
+! systemctl is-active systemd-importd
8be66a
+systemctl -T start systemd-importd
8be66a
+systemctl is-active systemd-importd
8be66a
+systemctl --show-transaction stop systemd-importd
8be66a
+! systemctl is-active systemd-importd
8be66a
+
8be66a
 # Test for a crash when enqueuing a JOB_NOP when other job already exists
8be66a
 systemctl start --no-block hello-after-sleep.target
8be66a
 # hello.service should still be waiting, so these try-restarts will collapse