Smoke-test for restarts

This commit is contained in:
Bryan Boreham committed 2016-02-26 23:41:57 +00:00
1 parent 561c8d012c
commit 65f435f042
1 file changed
+21
+21
View File
@@ -0,0 +1,21 @@
#! /bin/bash
. ./config.sh
start_suite "Check restart re-uses same container when possible"
ID=$(weave_on $HOST1 launch-router)
weave_on $HOST1 stop-router
assert "weave_on $HOST1 launch-router" "$ID"
# Can't start if already running with different args
assert_raises "weave_on $HOST1 launch-router --log-level=debug" 1
# Stop then start with different arg
weave_on $HOST1 stop-router
ID2=$(weave_on $HOST1 launch-router --log-level=debug)
assert "[ $ID != $ID2 ]"
# Fails on bad argument
assert_raises "weave_on $HOST1 launch-plugin --foo" 1
# Fails again on bad argument, although there is a dead container
assert_raises "weave_on $HOST1 launch-plugin --foo" 1
end_suite