Make 210_dns_cross_hosts_test.sh excercise gossip dns tombstones.

Also, make gce.sh less verbose, and do the env dance correctly.
This commit is contained in:
Tom Wilkie committed 2015-07-16 12:48:00 +00:00
1 parent 23ad547db4
commit 6e5995964d
3 files changed
+32 -7

No files matched your search

+25
View File
@@ -36,6 +36,31 @@ start_container_with_dns $HOST1 --name=baz
assert_dns_record $HOST1 baz foo.weave.local $FOO_IPS
assert_dns_record $HOST1 baz bar.weave.local $BAR_IPS
# now stop and start the containers a bunch of times
# this tests gossip dns tombstone behaviour
for i in $(seq 5); do
for host in $HOSTS; do
proxy docker_on $host stop foo 1>/dev/null
proxy docker_on $host stop bar 1>/dev/null
done
assert_no_dns_record $HOST1 baz foo.weave.local
assert_no_dns_record $HOST1 baz bar.weave.local
FOO_IPS=
BAR_IPS=
for host in $HOSTS; do
proxy docker_on $host start foo 1>/dev/null
proxy docker_on $host start bar 1>/dev/null
FOO_IPS="$FOO_IPS $(container_ip $host foo)"
BAR_IPS="$BAR_IPS $(container_ip $host bar)"
done
assert_dns_record $HOST1 baz foo.weave.local $FOO_IPS
assert_dns_record $HOST1 baz bar.weave.local $BAR_IPS
done
# resolution for names mapped to multiple addresses
weave_on $HOST2 dns-add $C2a c2 -h $NAME2
weave_on $HOST2 dns-add $C2b c2 -h $NAME2