aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_dns2gns.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_dns2gns.sh')
-rwxr-xr-xsrc/gns/test_dns2gns.sh50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gns/test_dns2gns.sh b/src/gns/test_dns2gns.sh
deleted file mode 100755
index 295bcc766..000000000
--- a/src/gns/test_dns2gns.sh
+++ /dev/null
@@ -1,50 +0,0 @@
1#!/bin/bash
2# This file is in the public domain.
3trap "gnunet-arm -e -c test_dns2gns.conf" INT
4which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
5
6LOCATION=$(which gnunet-config)
7if [ -z $LOCATION ]
8then
9 LOCATION="gnunet-config"
10fi
11$LOCATION --version 1> /dev/null
12if test $? != 0
13then
14 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
15 exit 77
16fi
17
18rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME`
19MY_EGO="localego"
20TEST_IP="127.0.0.1"
21TEST_IPV6="dead::beef"
22LABEL="fnord"
23TEST_DOMAIN="gnunet.org"
24
25gnunet-arm -s -c test_dns2gns.conf
26PKEY=`gnunet-identity -V -C $MY_EGO -c test_dns2gns.conf`
27gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t A -V $TEST_IP -e 3600s -c test_dns2gns.conf
28gnunet-namestore -p -z $MY_EGO -a -n $LABEL -t AAAA -V $TEST_IPV6 -e 3600s -c test_dns2gns.conf
29
30# FIXME resolution works but always returns all available records
31# also, the records seem to be returned twice if using GNS
32
33if nslookup -port=12000 $LABEL.$PKEY localhost && nslookup -port=12000 $LABEL.$MY_EGO localhost; then
34 echo "PASS: GNS records can be resolved using dns2gns bridge"
35else
36 echo "FAIL: GNS records can't be resolved using dns2gns bridge"
37 rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME`
38 exit 1
39fi
40
41if nslookup -port=12000 gnunet.org localhost; then
42 echo "PASS: DNS records can be resolved using dns2gns bridge"
43else
44 echo "FAIL: DNS records can't be resolved using dns2gns bridge"
45 rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME`
46 exit 1
47fi
48gnunet-arm -e -c test_dns2gns.conf
49
50rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME`