Instead of POSTing to IPAM in order to obtain IPs, we GET existing IPs. We ignore 404s, so detaching/hiding remains idempotent. Fixes #860
27 lines
559 B
Bash
Executable File
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
|