mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
test: shellcheck fixes to new test
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
8b5fa5eeaa
commit
fb4c560196
1 file changed
+9
-6
@@ -30,17 +30,18 @@ test_teardown()
|
|||||||
|
|
||||||
pidof()
|
pidof()
|
||||||
{
|
{
|
||||||
texec initctl status $1 -j|jq .pid
|
texec initctl -j status "$1" | jq .pid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "$TEST_DIR/lib/setup.sh"
|
. "$TEST_DIR/lib/setup.sh"
|
||||||
|
|
||||||
|
sep "$FINIT_CONF"
|
||||||
sep
|
|
||||||
say "finit config:"
|
|
||||||
run "cat $FINIT_CONF"
|
run "cat $FINIT_CONF"
|
||||||
sep
|
sep
|
||||||
run "initctl reload"
|
run "initctl reload"
|
||||||
|
run "initctl status"
|
||||||
|
sep
|
||||||
|
|
||||||
say "waiting for primary startup to complete"
|
say "waiting for primary startup to complete"
|
||||||
retry 'assert_status allup "done"' 100 1
|
retry 'assert_status allup "done"' 100 1
|
||||||
@@ -49,12 +50,12 @@ oldpid=$(pidof C)
|
|||||||
assert_status D "running"
|
assert_status D "running"
|
||||||
doldpid=$(pidof D)
|
doldpid=$(pidof D)
|
||||||
|
|
||||||
say "pre-reload status"
|
sep "pre-reload status"
|
||||||
run "initctl status"
|
run "initctl status"
|
||||||
sep
|
sep
|
||||||
|
|
||||||
# toggle_finit_debug
|
|
||||||
say "Reload Finit, who gets restarted?"
|
say "Reload Finit, who gets restarted?"
|
||||||
|
#run "initctl debug"
|
||||||
run "initctl reload"
|
run "initctl reload"
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
@@ -64,7 +65,9 @@ assert_status C "running"
|
|||||||
assert_status D "running"
|
assert_status D "running"
|
||||||
|
|
||||||
newpid=$(pidof C)
|
newpid=$(pidof C)
|
||||||
|
# shellcheck disable=SC2086
|
||||||
assert "C was not restarted" $oldpid -eq $newpid
|
assert "C was not restarted" $oldpid -eq $newpid
|
||||||
|
|
||||||
dnewpid=$(pidof D)
|
dnewpid=$(pidof D)
|
||||||
|
# shellcheck disable=SC2086
|
||||||
assert "D was not restarted" $doldpid -eq $dnewpid
|
assert "D was not restarted" $doldpid -eq $dnewpid
|
||||||
Reference in new issue
Block a user