diff options
Diffstat (limited to 'src/gns/test_gns_rel_expiration.sh')
-rwxr-xr-x | src/gns/test_gns_rel_expiration.sh | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/gns/test_gns_rel_expiration.sh b/src/gns/test_gns_rel_expiration.sh index 9890641e2..992098db3 100755 --- a/src/gns/test_gns_rel_expiration.sh +++ b/src/gns/test_gns_rel_expiration.sh | |||
@@ -13,27 +13,30 @@ then | |||
13 | exit 77 | 13 | exit 77 |
14 | fi | 14 | fi |
15 | 15 | ||
16 | MY_EGO="myego" | ||
17 | OTHER_EGO="delegatedego" | ||
18 | |||
16 | rm -rf /tmp/test-gnunet-gns-peer-1/ | 19 | rm -rf /tmp/test-gnunet-gns-peer-1/ |
17 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 20 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" |
18 | TEST_IP="127.0.0.1" | 21 | TEST_IP="127.0.0.1" |
19 | gnunet-arm -s -c test_gns_lookup.conf | 22 | gnunet-arm -s -c test_gns_lookup.conf |
20 | gnunet-identity -C testego -c test_gns_lookup.conf | 23 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
21 | gnunet-identity -C delegatedego -c test_gns_lookup.conf | 24 | gnunet-identity -C $OTHER_EGO -c test_gns_lookup.conf |
22 | DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego | awk '{print $3}') | 25 | DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep $OTHER_EGO | awk '{print $3}') |
23 | gnunet-namestore -p -z testego -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 |
24 | gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf | 27 | gnunet-namestore -p -z $OTHER_EGO -a -n www -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf |
25 | gnunet-arm -i gns -c test_gns_lookup.conf | 28 | gnunet-arm -i gns -c test_gns_lookup.conf |
26 | # confirm that lookup currently works | 29 | # confirm that lookup currently works |
27 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf` | 30 | RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` |
28 | # remove entry | 31 | # remove entry |
29 | gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf | 32 | gnunet-namestore -z $OTHER_EGO -d -n www -t A -V $TEST_IP -e '5 s' -c test_gns_lookup.conf |
30 | # wait for old entry with 5s 'expiration' to definitively expire | 33 | # wait for old entry with 5s 'expiration' to definitively expire |
31 | sleep 6 | 34 | sleep 6 |
32 | # try again, should no longer work | 35 | # try again, should no longer work |
33 | RES_IP_EXP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf` | 36 | RES_IP_EXP=`$DO_TIMEOUT gnunet-gns --raw -u www.b.$MY_EGO -t A -c test_gns_lookup.conf` |
34 | gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -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 |
35 | gnunet-identity -D testego -c test_gns_lookup.conf | 38 | gnunet-identity -D $MY_EGO -c test_gns_lookup.conf |
36 | gnunet-identity -D delegatedego -c test_gns_lookup.conf | 39 | gnunet-identity -D $OTHER_EGO -c test_gns_lookup.conf |
37 | gnunet-arm -e -c test_gns_lookup.conf | 40 | gnunet-arm -e -c test_gns_lookup.conf |
38 | rm -rf /tmp/test-gnunet-gns-peer-1/ | 41 | rm -rf /tmp/test-gnunet-gns-peer-1/ |
39 | 42 | ||