From 5c3fe86be72ccb5c4c91ab8fa70bde274980a95e Mon Sep 17 00:00:00 2001 From: Michael Bridgen Date: Wed, 14 Jan 2015 17:02:17 +0000 Subject: [PATCH] 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. --- test/210_dns_multicast_test.sh | 7 +++++-- test/300_fallback_dns_test.sh | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/210_dns_multicast_test.sh b/test/210_dns_multicast_test.sh index 59218552..8afedfb3 100755 --- a/test/210_dns_multicast_test.sh +++ b/test/210_dns_multicast_test.sh @@ -16,8 +16,8 @@ done run_on $HOST1 sudo $WEAVE launch run_on $HOST2 sudo $WEAVE launch $HOST1 -run_on $HOST1 sudo $WEAVE launch-dns 10.0.0.2/8 -run_on $HOST2 sudo $WEAVE launch-dns 10.0.0.3/8 +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 @@ -28,4 +28,7 @@ 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 diff --git a/test/300_fallback_dns_test.sh b/test/300_fallback_dns_test.sh index 679d621a..808bc6e3 100755 --- a/test/300_fallback_dns_test.sh +++ b/test/300_fallback_dns_test.sh @@ -5,7 +5,7 @@ start_suite "Resolve a non-weave address" run_on $HOST1 sudo $WEAVE stop-dns || true -run_on $HOST1 sudo $WEAVE launch-dns 10.0.0.2 +run_on $HOST1 sudo $WEAVE launch-dns 10.2.6.2 -debug docker_on $HOST1 rm -f c1 || true run_on $HOST1 sudo $WEAVE run --with-dns 10.1.1.5/24 --name=c1 -t aanand/docker-dnsutils /bin/sh @@ -13,4 +13,7 @@ run_on $HOST1 sudo $WEAVE run --with-dns 10.1.1.5/24 --name=c1 -t aanand/docker- ok=$(docker -H tcp://$HOST1:2375 exec -i c1 dig +short -t MX weave.works) assert "test -n \"$ok\" && echo pass" "pass" +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