From d5ec9fb38dafa3cabe3c9aa581f678f024cf39e1 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 18 Nov 2016 20:42:11 +0000 Subject: [PATCH] Fix test 700 to use resolver override instead of /etc/hosts override that didn't work in netgo mode --- test/700_status_and_report_test.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/700_status_and_report_test.sh b/test/700_status_and_report_test.sh index 19727201..1fdeb337 100755 --- a/test/700_status_and_report_test.sh +++ b/test/700_status_and_report_test.sh @@ -34,12 +34,11 @@ assert_raises "weave_on $HOST1 status | grep 'version check update disabled'" weave_on $HOST1 reset +# Remove any old version of the file - volume-mounting it changes the ownership to root +$SSH $HOST1 sudo rm -f /tmp/resolv.conf.broken # Guarantee the version check fails by feeding an unresponsive IP address into the resolver -$SSH $HOST1 tee /tmp/hosts.checkpoint-api > /dev/null < /tmp/resolv.conf.broken" +CHECKPOINT_DISABLE="" WEAVE_DOCKER_ARGS="-v /tmp/resolv.conf.broken:/etc/resolv.conf" weave_on $HOST1 launch assert "weave_on $HOST1 report -f '{{.VersionCheck.Enabled}}'" "true" assert "weave_on $HOST1 report -f '{{.VersionCheck.Success}}'" "false"