From fe41d052396d6d63c0ad3ff10852f3289418b0db Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Fri, 18 Oct 2013 11:50:24 +0000 Subject: -add test for resolving refreshed record, fails --- src/gns/test_gns_rel_expiration.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gns/test_gns_rel_expiration.sh b/src/gns/test_gns_rel_expiration.sh index c52262ded..099410c3e 100755 --- a/src/gns/test_gns_rel_expiration.sh +++ b/src/gns/test_gns_rel_expiration.sh @@ -10,9 +10,10 @@ DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e '2 s' -c test_gns_lookup.conf gnunet-arm -i gns -c test_gns_lookup.conf -sleep 1 +sleep 4 gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e '2 s' -c test_gns_lookup.conf -sleep 8 +RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf` +sleep 4 RES_IP_EXP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf` gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf gnunet-identity -D testego -c test_gns_lookup.conf @@ -24,3 +25,11 @@ then echo "Failed to properly expire IP, got $RES_IP_EXP." exit 1 fi + +if [ "$RES_IP" == "$TEST_IP" ] +then + exit 0 +else + echo "Failed to properly resolve IP, got $RES_IP." + exit 1 +fi -- cgit v1.2.3