Skip to content

Commit

Permalink
Check re-attaching 'weave attach' address
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Feb 3, 2016
1 parent 4f6f2a1 commit 258f904
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/163_docker_restart_test.sh
Expand Up @@ -36,14 +36,22 @@ C2=$(container_ip $HOST1 c2)
assert_raises "[ -n $C2 ]"
check_attached c2

# Another container, that we attach after creation
docker_on $HOST1 run -di --name=c3 --restart=always -dt --entrypoint="/home/weave/sigproxy" weaveworks/weaveexec sleep 600
weave_on $HOST1 attach c3
C3=$(container_ip $HOST1 c3)
assert_raises "[ -n $C3 ]"
check_attached c3

docker_on $HOST1 rm -f c1

# Restart docker daemon, using different commands for systemd- and upstart-managed.
run_on $HOST1 sh -c "command -v systemctl >/dev/null && sudo systemctl restart docker || sudo service docker restart"
wait_for_proxy $HOST1
sleep 3 # allow for re-tries of attach
check_attached c2
check_attached c2 c3
# Check same IP address was retained
assert "container_ip $HOST1 c2" "$C2"
assert "container_ip $HOST1 c3" "$C3"

end_suite

0 comments on commit 258f904

Please sign in to comment.