Merge pull request #1166 from weaveworks/dns-tests

Make 210_dns_cross_hosts_test.sh excercise gossip dns tombstones.
This commit is contained in:
Matthias Radestock committed 2015-07-16 16:11:58 +01:00
commit 70110e483c
3 files changed
+32 -7

No files matched your search

+2 -2
View File
@@ -41,9 +41,9 @@ test:
parallel: true
- cd $SRCDIR/test; ./gce.sh setup:
parallel: true
- cd $SRCDIR/test; . ./gce.sh hosts; ./setup.sh:
- cd $SRCDIR/test; eval $(./gce.sh hosts); ./setup.sh:
parallel: true
- cd $SRCDIR/test; . ./gce.sh hosts; export COVERAGE=true; ./run_all.sh:
- cd $SRCDIR/test; eval $(./gce.sh hosts); export COVERAGE=true; ./run_all.sh:
parallel: true
timeout: 300
post:
+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 kill foo 1>/dev/null
proxy docker_on $host kill 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
+5 -5
View File
@@ -5,7 +5,7 @@
# ./gce.sh destroy - tear down the VMs
# ./gce.sh make_template - make a fresh VM template; update TEMPLATE_NAME first!
set -ex
set -e
KEY_FILE=/tmp/gce_private_key.json
SSH_KEY_FILE=$HOME/.ssh/gce_ssh_key
@@ -20,7 +20,7 @@ if [ -n "$CIRCLECI" ]; then
fi
# Setup authentication
gcloud auth activate-service-account --key-file $KEY_FILE
gcloud auth activate-service-account --key-file $KEY_FILE 1>/dev/null
gcloud config set project $PROJECT
function vm_names {
@@ -120,9 +120,9 @@ function hosts {
hosts="$hostname $hosts"
args="--add-host=$hostname:$(internal_ip $name) $args"
done
export SSH=ssh
export HOSTS="$hosts"
export WEAVE_DOCKER_ARGS="$args"
echo export SSH=ssh
echo export HOSTS=\"$hosts\"
echo export WEAVE_DOCKER_ARGS=\"$args\"
}
case "$1" in