Files
weave/test/200_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

26 lines
568 B
Bash
Executable File

#! /bin/bash
. ./config.sh
C1=10.2.0.78
C2=10.2.0.34
start_suite "Resolve names on a single host"
weave_on $HOST1 stop || true
weave_on $HOST1 stop-dns || true
weave_on $HOST1 launch-dns 10.2.254.1/24
docker_on $HOST1 rm -f c1 c2 || true
weave_on $HOST1 run $C2/24 -t --name=c2 -h seetwo.weave.local ubuntu
weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
ok=$(exec_on $HOST1 c1 dig +short seetwo.weave.local)
assert "echo $ok" "$C2"
ok=$(exec_on $HOST1 c1 dig +short -x $C2)
assert "echo $ok" "seetwo.weave.local."
end_suite