Tests use distinct subnets

This commit is contained in:
Adam Harrison committed 2015-03-31 12:09:22 +01:00
1 parent dc49f78588
commit aa88dfca11
1 file changed
+16 -16
+16 -16
View File
@@ -63,32 +63,32 @@ assert_bridge_cidrs() {
} }
# Run container with three cidrs # Run container with three cidrs
CID=$(DOCKER_HOST=tcp://$HOST1:2375 $WEAVE run 10.0.0.1/24 10.0.0.2/24 10.0.0.3/24 -t --name multicidr -h multicidr.weave.local ubuntu | cut -b 1-12) CID=$(DOCKER_HOST=tcp://$HOST1:2375 $WEAVE run 10.0.1.1/24 10.0.2.1/24 10.0.3.1/24 -t --name multicidr -h multicidr.weave.local ubuntu | cut -b 1-12)
assert_container_cidrs $HOST1 $CID 10.0.0.1/24 10.0.0.2/24 10.0.0.3/24 assert_container_cidrs $HOST1 $CID 10.0.1.1/24 10.0.2.1/24 10.0.3.1/24
assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.0.1 10.0.0.2 10.0.0.3 assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.1.1 10.0.2.1 10.0.3.1
# Remove two of them # Remove two of them
weave_on $HOST1 detach 10.0.0.2/24 10.0.0.3/24 $CID weave_on $HOST1 detach 10.0.1.1/24 10.0.3.1/24 $CID
assert_container_cidrs $HOST1 $CID 10.0.0.1/24 assert_container_cidrs $HOST1 $CID 10.0.2.1/24
assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.0.1 assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.2.1
# Put them both back # Put them both back
weave_on $HOST1 attach 10.0.0.2/24 10.0.0.3/24 $CID weave_on $HOST1 attach 10.0.1.1/24 10.0.3.1/24 $CID
assert_container_cidrs $HOST1 $CID 10.0.0.1/24 10.0.0.2/24 10.0.0.3/24 assert_container_cidrs $HOST1 $CID 10.0.2.1/24 10.0.1.1/24 10.0.3.1/24
assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.0.1 10.0.0.2 10.0.0.3 assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.2.1 10.0.1.1 10.0.3.1
# Stop the container, restart with three IPs # Stop the container, restart with three IPs
docker_on $HOST1 stop $CID docker_on $HOST1 stop $CID
weave_on $HOST1 start 10.0.0.1/24 10.0.0.2/24 10.0.0.3/24 $CID weave_on $HOST1 start 10.0.1.1/24 10.0.2.1/24 10.0.3.1/24 $CID
assert_container_cidrs $HOST1 $CID 10.0.0.1/24 10.0.0.2/24 10.0.0.3/24 assert_container_cidrs $HOST1 $CID 10.0.1.1/24 10.0.2.1/24 10.0.3.1/24
assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.0.1 10.0.0.2 10.0.0.3 assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.1.1 10.0.2.1 10.0.3.1
# Expose some cidrs # Expose some cidrs
weave_on $HOST1 expose 10.0.0.4/24 10.0.0.5/24 10.0.0.6/24 weave_on $HOST1 expose 10.0.1.2/24 10.0.2.2/24 10.0.3.2/24
assert_bridge_cidrs $HOST1 weave 10.0.0.4/24 10.0.0.5/24 10.0.0.6/24 assert_bridge_cidrs $HOST1 weave 10.0.1.2/24 10.0.2.2/24 10.0.3.2/24
# Hide some cidrs # Hide some cidrs
weave_on $HOST1 hide 10.0.0.5/24 10.0.0.6/24 weave_on $HOST1 hide 10.0.1.2/24 10.0.3.2/24
assert_bridge_cidrs $HOST1 weave 10.0.0.4/24 assert_bridge_cidrs $HOST1 weave 10.0.2.2/24
end_suite end_suite