Files
weave/test/510_detach_hide_no_ipalloc.sh
T
Matthias Radestock 1da24c68ca don't allocate IPs on 'detach' and 'hide'
Instead of POSTing to IPAM in order to obtain IPs, we GET existing
IPs. We ignore 404s, so detaching/hiding remains idempotent.

Fixes #860
2015-10-06 12:35:55 +01:00

27 lines
559 B
Bash
Executable File

#! /bin/bash
UNIVERSE=10.2.3.0/24
check() {
CMD="weave_on $HOST1 $@"
assert_raises "timeout 10 cat <( $CMD )"
}
. ./config.sh
start_suite "'detach' and 'hide' do not require IP allocation"
weave_on $HOST1 launch --ipalloc-range $UNIVERSE --init-peer-count=2
start_container $HOST1 10.2.1.1/24 --name=c1
check detach 10.2.1.1/24 c1
check detach net:10.2.3.0/24 c1
check detach c1
weave_on $HOST1 expose 10.2.1.2/24
check hide 10.2.1.2/24
check hide net:10.2.3.0/24
check hide
end_suite