aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_lookup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_lookup.sh')
-rw-r--r--src/gns/test_gns_lookup.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gns/test_gns_lookup.sh b/src/gns/test_gns_lookup.sh
index 8c876df61..bfb59c50f 100644
--- a/src/gns/test_gns_lookup.sh
+++ b/src/gns/test_gns_lookup.sh
@@ -1,23 +1,19 @@
1#!/bin/bash 1#!/bin/bash
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3 3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME`
4TEST_IP="127.0.0.1" 4TEST_IP="127.0.0.1"
5
6gnunet-arm -s -c test_gns_lookup.conf 5gnunet-arm -s -c test_gns_lookup.conf
7 6gnunet-identity -C testego -c test_gns_lookup.conf
8#gnunet-identity -C testego -c test_gns_lookup.conf
9
10gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 7gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
11RES_IP=$(gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf) 8RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf)
12
13gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 9gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
14 10gnunet-identity -D testego -c test_gns_lookup.conf
15gnunet-arm -e -c test_gns_lookup.conf 11gnunet-arm -e -c test_gns_lookup.conf
16 12
17if [ "$RES_IP" == "$TEST_IP" ] 13if [ "$RES_IP" == "$TEST_IP" ]
18then 14then
19 exit 0 15 exit 0
20else 16else
17 echo "Failed to resolve to proper IP, got $RES_IP."
21 exit 1 18 exit 1
22fi 19fi
23