[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 02/02: tests: Adjust "herd stop" test.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 02/02: tests: Adjust "herd stop" test. |
Date: |
Sat, 16 Mar 2019 12:46:18 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit 20ab3f2220328e29c20e9605494d417a7406009b
Author: Ludovic Courtès <address@hidden>
Date: Sat Mar 16 17:43:03 2019 +0100
tests: Adjust "herd stop" test.
This is a followup to 5368ee4a9f0e71a091883c0b6bddbcf33ab1ecf8.
* tests/basic.sh: Avoid $(...) form, quote the output of "$herd stop
test", and redirect stderr or "herd stop" to stdout so we actually
capture it.
---
tests/basic.sh | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/basic.sh b/tests/basic.sh
index 27998bd..a54b5a5 100644
--- a/tests/basic.sh
+++ b/tests/basic.sh
@@ -1,5 +1,5 @@
# GNU Shepherd --- Test basic communication capabilities.
-# Copyright © 2013, 2014, 2016, 2017, 2018 Ludovic Courtès <address@hidden>
+# Copyright © 2013, 2014, 2016, 2017, 2018, 2019 Ludovic Courtès
<address@hidden>
# Copyright © 2016 Mathieu Lirzin <address@hidden>
# Copyright © 2014 Alex Sassmannshausen <address@hidden>
#
@@ -92,9 +92,8 @@ $herd stop test
$herd status test | grep stopped
# Stopping a stopped service should be a no-op.
-out=$($herd stop test)
-test $?
-test -z "$out"
+$herd stop test
+test -z "`$herd stop test 2>&1`"
# Disable a service and make sure it cannot be started.
$herd disable test-2