Files
weave/test/220_dns_custom_test.sh
T
Tom Wilkie 8b061fd555 Gossip-based DNS embedded in the router.
- Nameserver holds a sorted list of (hostname, peer, container id, ip) tuples.
- Entries are gossiped using topology gossip / broadcast - only new/updated entries
  are propogated as expected.
- Entries for a given peer are removed when the connection to the peer is lost.
- Entries are tombstoned when containers die.  Tombstones are kept for 10mins,
  as they do not need to survive partition, only gossip propagation delay.
2015-07-14 16:00:38 +00:00

33 lines
683 B
Bash
Executable File

#! /bin/bash
. ./config.sh
C1=10.2.56.34
C2=10.2.54.91
DOMAIN=foo.bar
NAME=seetwo.$DOMAIN
start_suite "Resolve names in custom domain"
# Check with a trailing dot on domain
weave_on $HOST1 launch --dns-domain $DOMAIN.
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
rm_containers $HOST1 c1
rm_containers $HOST1 c2
weave_on $HOST1 stop
# Check without a trailing dot on domain
weave_on $HOST1 launch --dns-domain $DOMAIN
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
end_suite