Files
weave/test/300_fallback_dns_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

20 lines
544 B
Bash
Executable File

#! /bin/bash
. ./config.sh
start_suite "Resolve a non-weave address"
run_on $HOST1 sudo $WEAVE stop-dns || true
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
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