Files
weave/test/230_dns_unqualified_test.sh
T
Adam Harrison b8afefa55f Merge pull request #931 from paulbellamy/weavedns_default_search_domain
[dns] resolve names in `weave.local` by default unless hostname or search path is specified
2015-06-16 18:13:17 +01:00

30 lines
580 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"
launch_dns_on $HOST1 10.2.254.1/24
start_container $HOST1 $C1/24 --name=c1 -h $NAME
start_container_with_dns $HOST1 $C2/24 --name=c2 -h seetwo.$DOMAIN
start_container_with_dns $HOST1 $C3/24 --name=c3 --dns-search=$DOMAIN
container=$(start_container_with_dns $HOST1 $C4/24)
check() {
assert "exec_on $HOST1 $1 getent hosts seeone | tr -s ' '" "$C1 $NAME"
}
check c2
check c3
check "$container"
end_suite