aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2018-10-13 16:01:55 +0900
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2018-10-13 16:01:55 +0900
commitd30e5404920a46181e1d35d2c94ac56369d0ae5c (patch)
tree05e43aa5e5bcf2b376249ed1b3525b00d2afcc01 /src
parent9cb80ff9474923b25ca722f93fe11e12c5551a7c (diff)
downloadgnunet-d30e5404920a46181e1d35d2c94ac56369d0ae5c.tar.gz
gnunet-d30e5404920a46181e1d35d2c94ac56369d0ae5c.zip
add rel expiration test
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gns/test_gns_dht_lookup.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gns/test_gns_dht_lookup.sh b/src/gns/test_gns_dht_lookup.sh
index 6c977bb0d..247795f31 100755
--- a/src/gns/test_gns_dht_lookup.sh
+++ b/src/gns/test_gns_dht_lookup.sh
@@ -24,15 +24,25 @@ gnunet-identity -C $OTHER_EGO -c test_gns_lookup.conf
24DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO | awk '{print $3}') 24DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO | awk '{print $3}')
25gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 25gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
26gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 26gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
27#This works
27gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 28gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
29#This doesn't
30gnunet-namestore -p -z $OTHER_EGO -a -n www2 -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf
28gnunet-arm -i gns -c test_gns_lookup.conf 31gnunet-arm -i gns -c test_gns_lookup.conf
29sleep 0.5 32sleep 6
30gnunet-namestore -z $OTHER_EGO -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
31RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf`
32gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf 33gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
34#gnunet-namestore -z $OTHER_EGO -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
35RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf`
36RES_IP_REL=`$DO_TIMEOUT gnunet-gns --raw -u www2.b.$MY_EGO -t A -c test_gns_lookup.conf`
37#gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
33gnunet-arm -e -c test_gns_lookup.conf 38gnunet-arm -e -c test_gns_lookup.conf
34rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 39rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
35 40
41if [ "$RES_IP_REL" != "$TEST_IP" ]
42then
43 echo "Failed to resolve to proper IP, got $RES_IP_REL. (relative expiration)"
44 #exit 1
45fi
36if [ "$RES_IP" == "$TEST_IP" ] 46if [ "$RES_IP" == "$TEST_IP" ]
37then 47then
38 exit 0 48 exit 0