aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_reverse_lookup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_reverse_lookup.sh')
-rwxr-xr-xsrc/gns/test_gns_reverse_lookup.sh50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gns/test_gns_reverse_lookup.sh b/src/gns/test_gns_reverse_lookup.sh
deleted file mode 100755
index 189adef11..000000000
--- a/src/gns/test_gns_reverse_lookup.sh
+++ /dev/null
@@ -1,50 +0,0 @@
1#!/bin/bash
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
4
5LOCATION=$(which gnunet-config)
6if [ -z $LOCATION ]
7then
8 LOCATION="gnunet-config"
9fi
10$LOCATION --version 1> /dev/null
11if test $? != 0
12then
13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
14 exit 77
15fi
16
17TEST_NAME="dave.bob.alice.gnu"
18gnunet-arm -s -c test_gns_lookup.conf
19gnunet-identity -C bob -c test_gns_lookup.conf
20BOB_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep bob | awk '{print $3}')
21gnunet-identity -C daveego -c test_gns_lookup.conf
22DAVE_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep dave | awk '{print $3}')
23gnunet-identity -C aliceego -c test_gns_lookup.conf
24ALICE_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep alice | awk '{print $3}')
25gnunet-identity -C testego -c test_gns_lookup.conf
26ROOT_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep testego | awk '{print $3}')
27
28gnunet-identity -s gns-reverse -e bob -c test_gns_lookup.conf
29
30gnunet-namestore -p -z testego -a -n alice -t PKEY -V $ALICE_PKEY -e never -c test_gns_lookup.conf
31gnunet-namestore -p -z aliceego -a -n bob -t PKEY -V $BOB_PKEY -e never -c test_gns_lookup.conf
32gnunet-namestore -p -z aliceego -a -n + -t REVERSE -V "alice $ROOT_PKEY 0" -e never -c test_gns_lookup.conf
33gnunet-namestore -p -z bob -a -n dave -t PKEY -V $DAVE_PKEY -e never -c test_gns_lookup.conf
34gnunet-namestore -p -z bob -a -n alice -t PKEY -V $ALICE_PKEY -e never -c test_gns_lookup.conf
35#gnunet-namestore -p -z bob -a -n + -t REVERSE -V "bob $ALICE_PKEY 0" -e never -c test_gns_lookup.conf
36gnunet-namestore -p -z daveego -a -n + -t REVERSE -V "dave $BOB_PKEY 0" -e never -c test_gns_lookup.conf
37gnunet-namestore -p -z daveego -a -n bob -t PKEY -V $BOB_PKEY -e never -c test_gns_lookup.conf
38gnunet-arm -i gns -c test_gns_lookup.conf
39sleep 10
40RES_NAME=`$DO_TIMEOUT gnunet-gns --raw -z testego -R $DAVE_PKEY -c test_gns_lookup.conf`
41gnunet-arm -e -c test_gns_lookup.conf
42rm -rf /tmp/test-gnunet-gns-peer-1/
43
44if [ "$RES_NAME" == "$TEST_NAME" ]
45then
46 exit 0
47else
48 echo "Failed to resolve to proper IP, got $RES_IP."
49 exit 1
50fi