From f5186e74c07ddfadfbbfc97026966fe453cc5677 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Fri, 10 Jul 2015 15:33:00 +0000 Subject: [PATCH] Review feedback --- Makefile | 2 +- test/140_weave_local_test.sh | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c4a4cb8a..79a465ef 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ WEAVE_EXPORT=weave.tar WEAVEEXEC_DOCKER_VERSION=1.3.1 DOCKER_DISTRIB=prog/weaveexec/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz DOCKER_DISTRIB_URL=https://get.docker.com/builds/Linux/x86_64/docker-$(WEAVEEXEC_DOCKER_VERSION).tgz -COVERAGE_MODULES=./common,./common/docker,./ipam,./ipam/paxos,./ipam/ring,./ipam/space,./net,./net/address,./router +COVERAGE_MODULES=$(shell go list -f '{{join .Deps "\n"}}' ./prog/weaver | grep "weaveworks" | paste -s -d,) NETGO_CHECK=@strings $@ | grep cgo_stub\\\.go >/dev/null || { \ rm $@; \ echo "\nYour go standard library was built without the 'netgo' build tag."; \ diff --git a/test/140_weave_local_test.sh b/test/140_weave_local_test.sh index 7912001a..d198b727 100755 --- a/test/140_weave_local_test.sh +++ b/test/140_weave_local_test.sh @@ -4,15 +4,21 @@ start_suite "Run weave with --local" -run_on $HOST1 sudo COVERAGE=$COVERAGE weave --local reset +weave_local_on() { + host=$1 + shift 1 + run_on $host sudo COVERAGE=$COVERAGE weave --local $@ +} -run_on $HOST1 sudo COVERAGE=$COVERAGE weave --local launch --ipalloc-range 10.2.5.0/24 +weave_local_on $HOST1 reset + +weave_local_on $HOST1 launch --ipalloc-range 10.2.5.0/24 assert_raises "docker_on $HOST1 ps | grep weave" -run_on $HOST1 sudo COVERAGE=$COVERAGE weave --local run 10.2.6.5/24 -ti --name=c1 $SMALL_IMAGE /bin/sh +weave_local_on $HOST1 run 10.2.6.5/24 -ti --name=c1 $SMALL_IMAGE /bin/sh assert_raises "exec_on $HOST1 c1 $CHECK_ETHWE_UP" -run_on $HOST1 sudo COVERAGE=$COVERAGE weave --local run -ti --name=c2 $SMALL_IMAGE /bin/sh +weave_local_on $HOST1 run -ti --name=c2 $SMALL_IMAGE /bin/sh assert_raises "exec_on $HOST1 c2 $CHECK_ETHWE_UP" end_suite