Files
weave/test/630_proxy_dns_test.sh
Marc CARRE 2c7693b2c5 Fix tests following proxy merge.
Remove tests of situations that don't exist any more and fix the following tests:

- Fix test 660: pass arguments in correct order.
- Fix test 620: no double launch, weave stop instead of kill -9.

  - Now that router and proxy have been merged, we should only call `weave launch` once.
  - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`.

- Fix test 650: no double launch.
- Fix test 630: remove redundant case & assertions.
- Fix test 090: remove irrelevant assertions.

PING
2017-05-10 10:25:36 +00:00

36 lines
967 B
Bash
Executable File

#! /bin/bash
. "$(dirname "$0")/config.sh"
C1=10.2.0.78
C2=10.2.0.34
C1_NAME=c1.weave.local
C2_NAME=seetwo.weave.local
STATIC=static.name
STATIC_IP=10.9.9.9
do_assert_resolution() {
proxy_start_container_with_dns $HOST1 -e WEAVE_CIDR=$C2/24 -dt --name=c2 --add-host $STATIC:$STATIC_IP -h $C2_NAME
proxy_start_container_with_dns $HOST1 -e WEAVE_CIDR=$C1/24 -dt --name=c1 --add-host $STATIC:$STATIC_IP
$1 $HOST1 c1 $C2_NAME $C2
assert_dns_record $HOST1 c1 $STATIC $STATIC_IP
$1 $HOST1 c2 $C1_NAME $C1
assert_dns_record $HOST1 c2 $STATIC $STATIC_IP
rm_containers $HOST1 c1 c2
}
start_suite "Proxy registers containers with dns"
bridge_ip=$(weave_on $HOST1 docker-bridge-ip)
# Assert behaviour with weaveDNS running
weave_on $HOST1 launch
do_assert_resolution assert_dns_record
weave_on $HOST1 stop
# Assert behaviour with weaveDNS running, but dns forced off
weave_on $HOST1 launch --without-dns
do_assert_resolution assert_no_dns_record
end_suite