From 192fbe3a538b68f70498e9373ff9ee1f66f3103d Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 21 Apr 2016 16:19:59 +0100 Subject: [PATCH] Update test 320 to cope with persistence --- ...claim_3_test_disabled.sh => 320_claim_3_test.sh} | 13 +++++++++++++ 1 file changed, 13 insertions(+) rename test/{320_claim_3_test_disabled.sh => 320_claim_3_test.sh} (79%) diff --git a/test/320_claim_3_test_disabled.sh b/test/320_claim_3_test.sh similarity index 79% rename from test/320_claim_3_test_disabled.sh rename to test/320_claim_3_test.sh index e0ad4966d5..2e86053438 100755 --- a/test/320_claim_3_test_disabled.sh +++ b/test/320_claim_3_test.sh @@ -2,6 +2,13 @@ . ./config.sh +delete_persistence() { + for host in "$@" ; do + docker_on $host rm -v weavedb >/dev/null + docker_on $host rm weave >/dev/null + done +} + start_suite "Claiming addresses" weave_on $HOST1 launch-router @@ -15,6 +22,9 @@ assert_raises "exec_on $HOST2 c2 $PING $C1" stop_weave_on $HOST1 stop_weave_on $HOST2 +# Delete persistence data so they form a blank ring +delete_persistence $HOST1 $HOST2 + # Start hosts in reverse order so c1's address has to be claimed from host2 weave_on $HOST2 launch-router weave_on $HOST1 launch-router $HOST2 @@ -31,11 +41,14 @@ assert_raises "exec_on $HOST1 c1 $PING $C3" stop_weave_on $HOST1 stop_weave_on $HOST2 +delete_persistence $HOST1 $HOST2 + # Now make host1 attempt to claim from host2, when host2 is stopped # the point being to check whether host1 will hang trying to talk to host2 weave_on $HOST2 launch-router # Introduce host3 to remember the IPAM CRDT when we stop host2 weave_on $HOST3 launch-router $HOST2 +weave_on $HOST3 prime stop_weave_on $HOST2 weave_on $HOST1 launch-router $HOST3