extract startup of container with dns

There is now just one mention of the aanand/docker-dnsutils image; in
config.sh.
This commit is contained in:
Matthias Radestock committed 2015-05-16 21:00:27 +01:00
1 parent 8261c7f782
commit 4e7ddedf75
8 files changed
+20 -14

No files matched your search

+2 -2
View File
@@ -10,8 +10,8 @@ start_suite "Resolve names on a single host"
weave_on $HOST1 launch-dns 10.2.254.1/24
start_container $HOST1 $C2/24 --name=c2 -h $NAME
weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
start_container $HOST1 $C2/24 --name=c2 -h $NAME
start_container_with_dns $HOST1 $C1/24 --name=c1
assert_dns_record $HOST1 c1 $NAME $C2
+2 -2
View File
@@ -14,8 +14,8 @@ weave_on $HOST2 launch $HOST1
weave_on $HOST1 launch-dns 10.2.254.1/24 -debug
weave_on $HOST2 launch-dns 10.2.254.2/24 -debug
start_container $HOST2 $C2/24 --name=c2 -h $NAME
weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
start_container $HOST2 $C2/24 --name=c2 -h $NAME
start_container_with_dns $HOST1 $C1/24 --name=c1
assert_dns_record $HOST1 c1 $NAME $C2
+2 -2
View File
@@ -11,8 +11,8 @@ start_suite "Resolve names in custom domain"
weave_on $HOST1 launch-dns 10.2.254.1/24 --domain $DOMAIN.
start_container $HOST1 $C2/24 --name=c2 -h $NAME
weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
start_container $HOST1 $C2/24 --name=c2 -h $NAME
start_container_with_dns $HOST1 $C1/24 --name=c1
assert_dns_record $HOST1 c1 $NAME $C2
+3 -3
View File
@@ -12,9 +12,9 @@ start_suite "Resolve unqualified names"
weave_on $HOST1 launch-dns 10.2.254.1/24
start_container $HOST1 $C1/24 --name=c1 -h $NAME
weave_on $HOST1 run --with-dns $C2/24 -t --name=c2 -h seetwo.$DOMAIN aanand/docker-dnsutils /bin/sh
weave_on $HOST1 run --with-dns $C3/24 -t --name=c3 --dns-search=$DOMAIN aanand/docker-dnsutils /bin/sh
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
assert "exec_on $HOST1 c2 getent hosts seeone | tr -s ' '" "$C1 $NAME"
assert "exec_on $HOST1 c3 getent hosts seeone | tr -s ' '" "$C1 $NAME"
+2 -2
View File
@@ -11,8 +11,8 @@ start_suite "Add and remove names on a single host"
weave_on $HOST1 launch-dns 10.2.254.1/24
start_container $HOST1 $C2/24 --name=c2
weave_on $HOST1 run --with-dns $C1/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
start_container $HOST1 $C2/24 --name=c2
start_container_with_dns $HOST1 $C1/24 --name=c1
weave_on $HOST1 dns-add $C2 c2 -h $NAME2
+2 -2
View File
@@ -13,8 +13,8 @@ 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
start_container $HOST2 --name=c2 -h $NAME
weave_on $HOST1 run --with-dns -t --name=c1 aanand/docker-dnsutils /bin/sh
start_container $HOST2 --name=c2 -h $NAME
start_container_with_dns $HOST1 --name=c1
C2=$(container_ip $HOST2 c2)
assert_dns_record $HOST1 c1 $NAME $C2
+1 -1
View File
@@ -6,7 +6,7 @@ start_suite "Resolve a non-weave address"
weave_on $HOST1 launch-dns 10.2.254.1/24 -debug
weave_on $HOST1 run --with-dns 10.2.1.5/24 -t --name=c1 aanand/docker-dnsutils /bin/sh
start_container_with_dns $HOST1 10.2.1.5/24 --name=c1
assert_raises "exec_on $HOST1 c1 host -t mx weave.works | grep google"
assert_raises "exec_on $HOST1 c1 getent hosts 8.8.8.8 | grep google"
+6
View File
@@ -94,6 +94,12 @@ start_container() {
weave_on $host run $@ -t gliderlabs/alpine /bin/sh
}
start_container_with_dns() {
host=$1
shift 1
weave_on $host run --with-dns $@ -t aanand/docker-dnsutils /bin/sh
}
container_ip() {
weave_on $1 ps $2 | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
}