merge IPAM tests with rest
keeping them separate leads to too much duplication
This commit is contained in:
1 parent
8e1ac2b300
commit
9017888b9c
6 files changed
+51
-122
No files matched your search
+29
-15
@@ -6,7 +6,8 @@ C1=10.2.1.34
|
||||
C2=10.2.1.37
|
||||
C3=10.2.2.34
|
||||
C4=10.2.2.37
|
||||
EXP=10.2.1.101
|
||||
EXP=10.2.2.101
|
||||
UNIVERSE=10.2.3.0/24
|
||||
|
||||
weave_on1() {
|
||||
assert_raises "weave_on $HOST1 $@"
|
||||
@@ -23,45 +24,58 @@ exec_on1() {
|
||||
check_container_connectivity() {
|
||||
exec_on1 "c1 $PING $C2"
|
||||
exec_on1 "c3 $PING $C4"
|
||||
exec_on1 "c5 $PING $C6"
|
||||
# fails due to #620
|
||||
# exec_on1 "c3 ! $PING $C1"
|
||||
# exec_on1 "c5 ! $PING $C1"
|
||||
# exec_on1 "c5 ! $PING $C3"
|
||||
}
|
||||
|
||||
start_suite "exposing weave network to host"
|
||||
|
||||
# expose/hide work prior to launching weave
|
||||
# expose/hide with a CIDR work prior to launching weave
|
||||
run_on1 "! $PING $EXP"
|
||||
weave_on1 "expose $EXP/24"
|
||||
run_on1 " $PING $EXP"
|
||||
weave_on1 "hide $EXP/24"
|
||||
run_on1 "! $PING $EXP"
|
||||
|
||||
weave_on $HOST1 launch
|
||||
weave_on $HOST1 launch -iprange $UNIVERSE
|
||||
|
||||
start_container $HOST1 $C1/24 --name=c1
|
||||
start_container $HOST1 $C2/24 --name=c2
|
||||
start_container $HOST1 $C3/24 --name=c3
|
||||
start_container $HOST1 $C4/24 --name=c4
|
||||
start_container $HOST1 --name=c5
|
||||
start_container $HOST1 --name=c6
|
||||
C5=$(container_ip $HOST1 c5)
|
||||
C6=$(container_ip $HOST1 c6)
|
||||
|
||||
# absence of host connectivity by default
|
||||
run_on1 "! $PING $C1"
|
||||
run_on1 "! $PING $C3"
|
||||
run_on1 "! $PING $C5"
|
||||
check_container_connectivity
|
||||
|
||||
# host connectivity after 'expose'
|
||||
# host connectivity after 'expose', and idempotence of 'expose'
|
||||
weave_on1 "expose $EXP/24"
|
||||
run_on1 " $PING $C1"
|
||||
run_on1 "! $PING $C3"
|
||||
check_container_connectivity
|
||||
|
||||
# idempotence of 'expose'
|
||||
weave_on1 "expose $EXP/24"
|
||||
run_on1 "$PING $C1"
|
||||
|
||||
# no host connectivity after 'hide'
|
||||
weave_on1 "hide $EXP/24"
|
||||
run_on1 "! $PING $C1"
|
||||
run_on1 " $PING $C3"
|
||||
run_on1 "! $PING $C5"
|
||||
weave_on1 "expose"
|
||||
weave_on1 "expose"
|
||||
run_on1 "! $PING $C1"
|
||||
run_on1 " $PING $C3"
|
||||
run_on1 " $PING $C5"
|
||||
check_container_connectivity
|
||||
|
||||
# idempotence of 'hide'
|
||||
# no host connectivity after 'hide', and idempotence of 'hide'
|
||||
weave_on1 "hide $EXP/24"
|
||||
weave_on1 "hide $EXP/24"
|
||||
run_on1 "! $PING $C3"
|
||||
run_on1 " $PING $C5"
|
||||
weave_on1 "hide"
|
||||
weave_on1 "hide"
|
||||
run_on1 "! $PING $C5"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user