daandemeyer / rpms / systemd

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