Files
weave/test/280_with_or_without_dns_test.sh
T
2015-10-16 11:47:07 +02:00

33 lines
692 B
Bash
Executable File

#! /bin/bash
. ./config.sh
IP=10.2.0.34
TARGET=seetwo.weave.local
TARGET_IP=10.2.0.78
STATIC=static.name
STATIC_IP=10.9.9.9
check_dns() {
chk=$1
shift
container=$(weave_on $HOST1 run $@ $IP/24 -t --add-host=$STATIC:$STATIC_IP $DNS_IMAGE /bin/sh)
$chk $HOST1 $container $TARGET
assert_dns_record $HOST1 $container $STATIC $STATIC_IP
rm_containers $HOST1 $container
}
start_suite "With or without DNS test"
# Assert behaviour without weaveDNS running
weave_on $HOST1 launch-router
start_container $HOST1 $TARGET_IP/24 --name c2 -h $TARGET
check_dns assert_no_dns_record --without-dns
check_dns assert_dns_record
check_dns assert_dns_record --with-dns
end_suite