Files
weave/test/210_dns_multicast_test.sh
T
Michael Bridgen 5c3fe86be7 Include testing non-weave reverse queries in DNS smoke tests
Pro-tip: Do not put weaveDNS on the same subnet as the fallback DNS
server.
2015-01-14 17:02:17 +00:00

35 lines
948 B
Bash
Executable File

#! /bin/bash
. ./config.sh
C1=10.2.3.78
C2=10.2.3.34
start_suite "Resolve names across hosts"
for host in $HOST1 $HOST2; do
run_on $host sudo $WEAVE stop || true
run_on $host sudo $WEAVE stop-dns || true
docker_on $host rm -f c1 c2 || true
done
run_on $HOST1 sudo $WEAVE launch
run_on $HOST2 sudo $WEAVE launch $HOST1
run_on $HOST1 sudo $WEAVE launch-dns 10.3.3.2/24 -debug
run_on $HOST2 sudo $WEAVE launch-dns 10.3.3.3/24 -debug
run_on $HOST2 sudo $WEAVE run $C2/24 -t --name=c2 -h seetwo.weave.local ubuntu
run_on $HOST1 sudo $WEAVE run --with-dns $C1/24 --name=c1 -t aanand/docker-dnsutils /bin/sh
ok=$(docker -H tcp://$HOST1:2375 exec -i c1 dig +short seetwo.weave.local)
assert "echo $ok" "$C2"
ok=$(docker -H tcp://$HOST1:2375 exec -i c1 dig +short -x $C2)
assert "echo $ok" "seetwo.weave.local."
ok=$(docker -H tcp://$HOST1:2375 exec -i c1 dig +short -x 8.8.8.8)
assert "test -n \"$ok\" && echo pass" "pass"
end_suite