mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
1 parent
a24077c4af
commit
bdaf3370d4
1 file changed
+9
-4
+9
-4
@@ -43,27 +43,32 @@ test_one()
|
|||||||
|
|
||||||
say 'Reload Finit'
|
say 'Reload Finit'
|
||||||
run "initctl reload"
|
run "initctl reload"
|
||||||
# run "initctl debug"
|
|
||||||
|
|
||||||
|
run "initctl status"
|
||||||
assert_status "foo" "running"
|
assert_status "foo" "running"
|
||||||
assert_cond "$cond"
|
assert_cond "$cond"
|
||||||
assert_status "bar" "running"
|
assert_status "bar" "running"
|
||||||
|
|
||||||
say "Verify bar is restarted with foo is ..."
|
say "Verify bar is restarted when foo is ..."
|
||||||
pid=$(texec initctl |grep bar | awk '{print $1;}')
|
pid=$(texec initctl |grep bar | awk '{print $1;}')
|
||||||
run "initctl restart foo"
|
run "initctl restart foo"
|
||||||
|
run "initctl status"
|
||||||
assert "bar is restarted" "$(texec initctl |grep bar | awk '{print $1;}')" != "$pid"
|
assert "bar is restarted" "$(texec initctl |grep bar | awk '{print $1;}')" != "$pid"
|
||||||
|
|
||||||
# Wait for spice to be stolen by the Harkonnen
|
# Wait for spice to be stolen by the Harkonnen
|
||||||
sleep 3
|
sleep 3
|
||||||
# bar should now have detected the loss of spice and be in restart
|
# bar should now have detected the loss of spice and be in restart
|
||||||
|
run "initctl status"
|
||||||
assert_status "bar" "restart"
|
assert_status "bar" "restart"
|
||||||
# verify bar is stopped->waiting and no longer in restart after stopping foo
|
# verify bar is stopped->waiting and no longer in restart after stopping foo
|
||||||
run "initctl stop foo"
|
run "initctl stop foo"
|
||||||
#run "initctl status bar"
|
run "initctl status"
|
||||||
|
run "initctl status bar"
|
||||||
assert_status "bar" "waiting"
|
assert_status "bar" "waiting"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sep
|
||||||
test_one "pid/foo"
|
test_one "pid/foo"
|
||||||
#run "initctl debug"
|
sep
|
||||||
|
run "initctl debug"
|
||||||
test_one "service/foo/running"
|
test_one "service/foo/running"
|
||||||
Reference in new issue
Block a user