summaryrefslogtreecommitdiff
path: root/test/TEST-03-JOBS/test-jobs.sh
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2013-02-22 18:59:07 +0100
committerMichal Schmidt <mschmidt@redhat.com>2013-02-23 14:18:17 +0100
commitd710d36375bacbf9cfb8903107bedf2c0aada84e (patch)
tree9ac862722f5efc863e841c63db015f9c85aea9b7 /test/TEST-03-JOBS/test-jobs.sh
parentf948423bb565194a5a8242f556bacf6f7e2d3273 (diff)
test: test irreversible jobs
Diffstat (limited to 'test/TEST-03-JOBS/test-jobs.sh')
-rwxr-xr-xtest/TEST-03-JOBS/test-jobs.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh
index 98746c5363..12b38af942 100755
--- a/test/TEST-03-JOBS/test-jobs.sh
+++ b/test/TEST-03-JOBS/test-jobs.sh
@@ -24,5 +24,18 @@ grep 'hello\.service' /root/list-jobs.txt && exit 1
# TODO: add more job queueing/merging tests here.
+# Test for irreversible jobs
+systemctl start unstoppable.service || exit 1
+
+# This is expected to fail with 'job cancelled'
+systemctl stop unstoppable.service && exit 1
+# But this should succeed
+systemctl stop --irreversible unstoppable.service || exit 1
+
+# We're going to shutdown soon. Let's see if it succeeds when
+# there's an active service that tries to be unstoppable.
+# Shutdown of the container/VM will hang if not.
+systemctl start unstoppable.service || exit 1
+
touch /testok
exit 0