diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2018-10-13 16:01:55 +0900 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2018-10-13 16:01:55 +0900 |
commit | d30e5404920a46181e1d35d2c94ac56369d0ae5c (patch) | |
tree | 05e43aa5e5bcf2b376249ed1b3525b00d2afcc01 /src | |
parent | 9cb80ff9474923b25ca722f93fe11e12c5551a7c (diff) | |
download | gnunet-d30e5404920a46181e1d35d2c94ac56369d0ae5c.tar.gz gnunet-d30e5404920a46181e1d35d2c94ac56369d0ae5c.zip |
add rel expiration test
Diffstat (limited to 'src')
-rwxr-xr-x | src/gns/test_gns_dht_lookup.sh | 16 |
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 | |||
24 | DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO | awk '{print $3}') | 24 | DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO | awk '{print $3}') |
25 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 25 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
26 | gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf | 26 | gnunet-namestore -p -z $MY_EGO -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf |
27 | #This works | ||
27 | gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | 28 | gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf |
29 | #This doesn't | ||
30 | gnunet-namestore -p -z $OTHER_EGO -a -n www2 -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf | ||
28 | gnunet-arm -i gns -c test_gns_lookup.conf | 31 | gnunet-arm -i gns -c test_gns_lookup.conf |
29 | sleep 0.5 | 32 | sleep 6 |
30 | gnunet-namestore -z $OTHER_EGO -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf | ||
31 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` | ||
32 | gnunet-namestore -z $MY_EGO -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf | 33 | gnunet-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 | ||
35 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` | ||
36 | RES_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 | ||
33 | gnunet-arm -e -c test_gns_lookup.conf | 38 | gnunet-arm -e -c test_gns_lookup.conf |
34 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 39 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
35 | 40 | ||
41 | if [ "$RES_IP_REL" != "$TEST_IP" ] | ||
42 | then | ||
43 | echo "Failed to resolve to proper IP, got $RES_IP_REL. (relative expiration)" | ||
44 | #exit 1 | ||
45 | fi | ||
36 | if [ "$RES_IP" == "$TEST_IP" ] | 46 | if [ "$RES_IP" == "$TEST_IP" ] |
37 | then | 47 | then |
38 | exit 0 | 48 | exit 0 |