From 4ebbdabfa1db40514809b157ee9513fb3955a292 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 4 Apr 2015 22:00:06 +0100 Subject: [PATCH] never, ever use 10.0 for anything it has a high probability of conflicting --- test/500_weave_multi_cidr_test.sh | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/500_weave_multi_cidr_test.sh b/test/500_weave_multi_cidr_test.sh index bd1532c2..9bfdf218 100755 --- a/test/500_weave_multi_cidr_test.sh +++ b/test/500_weave_multi_cidr_test.sh @@ -63,32 +63,32 @@ assert_bridge_cidrs() { } # Run container with three cidrs -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.1.1/24 10.0.2.1/24 10.0.3.1/24 -assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.1.1 10.0.2.1 10.0.3.1 +CID=$(DOCKER_HOST=tcp://$HOST1:2375 $WEAVE run 10.2.1.1/24 10.2.2.1/24 10.2.3.1/24 -t --name multicidr -h multicidr.weave.local ubuntu | cut -b 1-12) +assert_container_cidrs $HOST1 $CID 10.2.1.1/24 10.2.2.1/24 10.2.3.1/24 +assert_zone_records $HOST1 $CID multicidr.weave.local. 10.2.1.1 10.2.2.1 10.2.3.1 # Remove two of them -weave_on $HOST1 detach 10.0.1.1/24 10.0.3.1/24 $CID -assert_container_cidrs $HOST1 $CID 10.0.2.1/24 -assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.2.1 +weave_on $HOST1 detach 10.2.1.1/24 10.2.3.1/24 $CID +assert_container_cidrs $HOST1 $CID 10.2.2.1/24 +assert_zone_records $HOST1 $CID multicidr.weave.local. 10.2.2.1 # Put them both back -weave_on $HOST1 attach 10.0.1.1/24 10.0.3.1/24 $CID -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.2.1 10.0.1.1 10.0.3.1 +weave_on $HOST1 attach 10.2.1.1/24 10.2.3.1/24 $CID +assert_container_cidrs $HOST1 $CID 10.2.2.1/24 10.2.1.1/24 10.2.3.1/24 +assert_zone_records $HOST1 $CID multicidr.weave.local. 10.2.2.1 10.2.1.1 10.2.3.1 # Stop the container, restart with three IPs docker_on $HOST1 stop $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.1.1/24 10.0.2.1/24 10.0.3.1/24 -assert_zone_records $HOST1 $CID multicidr.weave.local. 10.0.1.1 10.0.2.1 10.0.3.1 +weave_on $HOST1 start 10.2.1.1/24 10.2.2.1/24 10.2.3.1/24 $CID +assert_container_cidrs $HOST1 $CID 10.2.1.1/24 10.2.2.1/24 10.2.3.1/24 +assert_zone_records $HOST1 $CID multicidr.weave.local. 10.2.1.1 10.2.2.1 10.2.3.1 # Expose some cidrs -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.1.2/24 10.0.2.2/24 10.0.3.2/24 +weave_on $HOST1 expose 10.2.1.2/24 10.2.2.2/24 10.2.3.2/24 +assert_bridge_cidrs $HOST1 weave 10.2.1.2/24 10.2.2.2/24 10.2.3.2/24 # Hide some cidrs -weave_on $HOST1 hide 10.0.1.2/24 10.0.3.2/24 -assert_bridge_cidrs $HOST1 weave 10.0.2.2/24 +weave_on $HOST1 hide 10.2.1.2/24 10.2.3.2/24 +assert_bridge_cidrs $HOST1 weave 10.2.2.2/24 end_suite