Files
weave/test/250_dns_ipam_test.sh
T
Matthias Radestock 2647fd4c92 extract helper for obtaining container ip address
thus keeping the ghastly regexp in one place instead of three.
2015-05-16 19:14:23 +01:00

23 lines
622 B
Bash
Executable File

#! /bin/bash
. ./config.sh
UNIVERSE=10.2.3.0/24
start_suite "Resolve names over cross-host weave network with IPAM"
weave_on $HOST1 launch -iprange $UNIVERSE
weave_on $HOST2 launch -iprange $UNIVERSE $HOST1
weave_on $HOST1 launch-dns 10.2.254.1/24
weave_on $HOST2 launch-dns 10.2.254.2/24
weave_on $HOST2 run -t --name=c2 -h seetwo.weave.local gliderlabs/alpine /bin/sh
weave_on $HOST1 run --with-dns --name=c1 -t aanand/docker-dnsutils /bin/sh
C2=$(container_ip $HOST2 c2)
assert "exec_on $HOST1 c1 dig +short seetwo.weave.local" "$C2"
assert "exec_on $HOST1 c1 dig +short -x $C2" "seetwo.weave.local."
end_suite