Files
weave/test/810_plugin_router_restart_test.sh
T
Marc CARRE 43249a8d39 Change all launch-*/stop-* commands to launch/stop.
Given `proxy` & `router` processes have been merged, `launch-proxy`,
`launch-router`, `stop-proxy`, `stop-router` do not make sense any more, and
should just be `launch` and `stop` with the appropriate flags.
2017-05-10 10:25:36 +00:00

27 lines
628 B
Bash
Executable File

#! /bin/bash
. "$(dirname "$0")/config.sh"
C1_NAME=c1.weave.local
start_suite "Recovery of container details on router restart (via 'local' plugin)"
weave_on $HOST1 launch
start_container_local_plugin $HOST1 --name=c1 --hostname=$C1_NAME
c1ip=$(container_ip $HOST1 c1)
weave_on $HOST1 stop
weave_on $HOST1 launch
assert "container_ip $HOST1 c1" "$c1ip"
assert "weave_on $HOST1 dns-lookup $C1_NAME" "$c1ip"
# check that c1 IP has been reclaimed and doesn't get assigned to a
# fresh container
start_container $HOST1 --name=c2
assert_raises "container_ip $HOST1 c2 | grep -v $c1ip"
docker_on $HOST1 rm -f c1 c2
end_suite