[tests] extract gliderlabs/alpine and aanand/docker-dnsutils into var in

config.sh

@bboreham made me do it.
This commit is contained in:
Paul Bellamy committed 2015-05-22 15:52:36 +01:00
1 parent cc82213147
commit 11931f3ea2
6 files changed
+12 -10

No files matched your search

+2 -2
View File
@@ -9,10 +9,10 @@ run_on $HOST1 sudo ./weave --local reset
run_on $HOST1 sudo ./weave --local launch -iprange 10.2.5.0/24
assert_raises "docker_on $HOST1 ps | grep weave"
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 gliderlabs/alpine /bin/sh
run_on $HOST1 sudo ./weave --local run 10.2.6.5/24 -ti --name=c1 $SMALL_IMAGE /bin/sh
assert_raises "exec_on $HOST1 c1 $CHECK_ETHWE_UP"
run_on $HOST1 sudo ./weave --local run -ti --name=c2 gliderlabs/alpine /bin/sh
run_on $HOST1 sudo ./weave --local run -ti --name=c2 $SMALL_IMAGE /bin/sh
assert_raises "exec_on $HOST1 c2 $CHECK_ETHWE_UP"
end_suite
@@ -5,7 +5,7 @@
start_suite "Proxy uses entrypoint from the image with weavewait"
weave_on $HOST1 launch-proxy
docker_on $HOST1 build -t inspect-ethwe - <<- EOF
FROM gliderlabs/alpine
FROM $SMALL_IMAGE
ENTRYPOINT ["ip", "link", "show", "ethwe"]
EOF
+2 -2
View File
@@ -10,8 +10,8 @@ start_suite "Proxy registers containers with dns"
weave_on $HOST1 launch-dns 10.2.254.1/24
weave_on $HOST1 launch-proxy --with-dns
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME gliderlabs/alpine /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 aanand/docker-dnsutils /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME $SMALL_IMAGE /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 $DNS_IMAGE /bin/sh
assert_dns_record $HOST1 c1 $NAME $C2
+2 -2
View File
@@ -10,8 +10,8 @@ start_suite "Proxy restart reattaches networking to containers"
weave_on $HOST1 launch-dns 10.2.254.1/24
weave_on $HOST1 launch-proxy --with-dns
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME gliderlabs/alpine /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 aanand/docker-dnsutils /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C2/24 -dt --name=c2 -h $NAME $SMALL_IMAGE /bin/sh
proxy docker_on $HOST1 run -e WEAVE_CIDR=$C1/24 -dt --name=c1 $DNS_IMAGE /bin/sh
proxy docker_on $HOST1 restart c2
assert_raises "proxy exec_on $HOST1 c2 $CHECK_ETHWE_UP"
+1 -1
View File
@@ -5,7 +5,7 @@
start_suite "Proxy allows overridden entrypoint from the container with weavewait"
weave_on $HOST1 launch-proxy
docker_on $HOST1 build -t false - <<- EOF
FROM gliderlabs/alpine
FROM $SMALL_IMAGE
ENTRYPOINT ["/bin/false"]
EOF
+4 -2
View File
@@ -29,6 +29,8 @@ HOST2=$(echo $HOSTS | cut -f 2 -d ' ')
SSH=${SSH:-ssh -l vagrant -i ./insecure_private_key -o UserKnownHostsFile=./.ssh_known_hosts -o CheckHostIP=no -o StrictHostKeyChecking=no}
SMALL_IMAGE="gliderlabs/alpine"
DNS_IMAGE="aanand/docker-dnsutils"
PING="ping -nq -W 1 -c 1"
CHECK_ETHWE_UP="grep ^1$ /sys/class/net/ethwe/carrier"
@@ -100,13 +102,13 @@ exec_on() {
start_container() {
host=$1
shift 1
weave_on $host run "$@" -t gliderlabs/alpine /bin/sh
weave_on $host run "$@" -t $SMALL_IMAGE /bin/sh
}
start_container_with_dns() {
host=$1
shift 1
weave_on $host run --with-dns "$@" -t aanand/docker-dnsutils /bin/sh
weave_on $host run --with-dns "$@" -t $DNS_IMAGE /bin/sh
}
container_ip() {