Files
weave/test/300_fallback_dns_test.sh
T
Matthias Radestock a7c9fd272c add exec_on helper
so we don't repeat the remote docker invocation command (complete with
hard-coded port) over and over again.
2015-04-22 09:25:42 +01:00

20 lines
477 B
Bash
Executable File

#! /bin/bash
. ./config.sh
start_suite "Resolve a non-weave address"
weave_on $HOST1 stop-dns || true
weave_on $HOST1 launch-dns 10.2.254.1/24 -debug
docker_on $HOST1 rm -f c1 || true
weave_on $HOST1 run --with-dns 10.2.1.5/24 --name=c1 -t aanand/docker-dnsutils /bin/sh
ok=$(exec_on $HOST1 c1 dig +short -t MX weave.works)
assert "test -n \"$ok\" && echo pass" "pass"
ok=$(exec_on $HOST1 c1 dig +short -x 8.8.8.8)
assert "test -n \"$ok\" && echo pass" "pass"
end_suite