diff --git a/test/700_status_and_report_test.sh b/test/700_status_and_report_test.sh index de32dc72..19727201 100755 --- a/test/700_status_and_report_test.sh +++ b/test/700_status_and_report_test.sh @@ -3,8 +3,6 @@ . ./config.sh UNIVERSE=10.2.0.0/16 -IPTABLES_BACKUP=/tmp/700_status_and_report_test.iptables -CHECKPOINT_URL=https://checkpoint-api.weave.works/v1/check/weave-net start_suite "weave status/report" @@ -35,20 +33,13 @@ assert_raises "weave_on $HOST1 status | grep 'version check update disabled'" -# Block outgoing traffic to Weave's checkpoint API, to prevent retrieval of latest version: -run_on $HOST1 "sudo iptables-save > $IPTABLES_BACKUP" -[ -z "$DEBUG" ] || greyly echo "Backed iptables rules up:" -[ -z "$DEBUG" ] || run_on $HOST1 cat $IPTABLES_BACKUP -[ -z "$DEBUG" ] || greyly echo "Updating iptables rules." -run_on $HOST1 sudo iptables -A OUTPUT -p tcp -d checkpoint-api.weave.works --dport 443 -j REJECT --reject-with tcp-reset -[ -z "$DEBUG" ] || greyly echo "Updated iptables rules:" -[ -z "$DEBUG" ] || run_on $HOST1 sudo iptables -L -[ -z "$DEBUG" ] || greyly echo "Test access to checkpoint:" -[ -z "$DEBUG" ] || run_on $HOST1 "curl -X GET $CHECKPOINT_URL || true" - weave_on $HOST1 reset - -CHECKPOINT_DISABLE="" weave_on $HOST1 launch +# Guarantee the version check fails by feeding an unresponsive IP address into the resolver +$SSH $HOST1 tee /tmp/hosts.checkpoint-api > /dev/null <