Files
weave/test/635_proxy_dns_unqualified_test.sh
T
Matthias Radestock 65578211ef extract test functions for "start container via proxy"
This also eliminates the redefinition of 'start_container' by some of
the tests, which causes failures when multiple tests are run with
`run_all.sh`.

Fixes #1294.
2015-08-13 15:01:15 +01:00

31 lines
701 B
Bash
Executable File

#! /bin/bash
. ./config.sh
C1=10.2.0.78
C2=10.2.0.34
C3=10.2.0.57
C4=10.2.0.99
DOMAIN=weave.local
NAME=seeone.$DOMAIN
start_suite "Resolve unqualified names"
weave_on $HOST1 launch-dns 10.2.254.1/24
weave_on $HOST1 launch-proxy
proxy_start_container_with_dns $HOST1 -e WEAVE_CIDR=$C1/24 --name=c1 -h $NAME
proxy_start_container_with_dns $HOST1 -e WEAVE_CIDR=$C2/24 --name=c2 -h seetwo.$DOMAIN
proxy_start_container_with_dns $HOST1 -e WEAVE_CIDR=$C3/24 --name=c3 --dns-search=$DOMAIN
container=$(proxy_start_container_with_dns $HOST1 -e WEAVE_CIDR=$C4/24)
check() {
assert "proxy exec_on $HOST1 $1 getent hosts seeone | tr -s ' '" "$C1 $NAME"
}
check c2
check c3
check "$container"
end_suite