aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_lookup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_lookup.sh')
-rwxr-xr-xsrc/gns/test_gns_lookup.sh12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/gns/test_gns_lookup.sh b/src/gns/test_gns_lookup.sh
index 85cc1f511..f90fb7364 100755
--- a/src/gns/test_gns_lookup.sh
+++ b/src/gns/test_gns_lookup.sh
@@ -3,26 +3,14 @@ trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` 3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
4which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 4which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
5TEST_IP="127.0.0.1" 5TEST_IP="127.0.0.1"
6TEST_IP6="dead::beef"
7gnunet-arm -s -c test_gns_lookup.conf 6gnunet-arm -s -c test_gns_lookup.conf
8gnunet-identity -C testego -c test_gns_lookup.conf 7gnunet-identity -C testego -c test_gns_lookup.conf
9gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 8gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
10gnunet-namestore -p -z testego -a -n www -t AAAA -V $TEST_IP6 -e never -c test_gns_lookup.conf
11RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf` 9RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf`
12RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t AAAA -c test_gns_lookup.conf`
13gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 10gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
14gnunet-namestore -z testego -d -n www -t AAAA -V $TEST_IP6 -e never -c test_gns_lookup.conf
15gnunet-identity -D testego -c test_gns_lookup.conf 11gnunet-identity -D testego -c test_gns_lookup.conf
16gnunet-arm -e -c test_gns_lookup.conf 12gnunet-arm -e -c test_gns_lookup.conf
17 13
18if [ "$RES_IP6" == "$TEST_IP6" ]
19then
20 echo "PASS: Resolved correct IPv6 address, got $RES_IP6"
21else
22 echo "FAIL: Failed to resolve to proper IP, got $RES_IP6."
23 exit 1
24fi
25
26if [ "$RES_IP" == "$TEST_IP" ] 14if [ "$RES_IP" == "$TEST_IP" ]
27then 15then
28 echo "PASS: Resolved correct IP address, got $RES_IP" 16 echo "PASS: Resolved correct IP address, got $RES_IP"