From c2cf825cdf5aa1aae3ad35008dbe2a407e8c2ea0 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 21 Mar 2016 17:58:12 +0000 Subject: [PATCH] Smoke test for stale DNS entries --- test/215_stale_dns_3_test.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/215_stale_dns_3_test.sh diff --git a/test/215_stale_dns_3_test.sh b/test/215_stale_dns_3_test.sh new file mode 100755 index 00000000..b75fcdd0 --- /dev/null +++ b/test/215_stale_dns_3_test.sh @@ -0,0 +1,31 @@ +#! /bin/bash + +. ./config.sh + +start_suite "Check propagation of DNS entries when gossip is delayed" + +weave_on $HOST1 launch-router --no-discovery +weave_on $HOST2 launch-router --no-discovery $HOST1 +weave_on $HOST3 launch-router --no-discovery $HOST2 + +start_container $HOST1 --name=c1 +C1=$(container_ip $HOST1 c1) +start_container_with_dns $HOST3 --name=c3 + +assert_dns_record $HOST3 c3 c1.weave.local $C1 + +# Stall the propagation of gossip, stop weave and kill the container +run_on $HOST3 "sudo iptables -A INPUT -s $HOST2 -j DROP" + +weave_on $HOST1 stop-router +docker_on $HOST1 rm -f c1 + +weave_on $HOST1 launch-router --no-discovery $HOST3 + +# Now re-enable gossip +run_on $HOST3 "sudo iptables -D INPUT -s $HOST2 -j DROP" + +# Currently failing due to Mesh #28 +# assert_no_dns_record $HOST3 c3 c1.weave.local + +end_suite