aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_gns2dns_zkey_lookup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_gns2dns_zkey_lookup.sh')
-rwxr-xr-xsrc/gns/test_gns_gns2dns_zkey_lookup.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gns/test_gns_gns2dns_zkey_lookup.sh b/src/gns/test_gns_gns2dns_zkey_lookup.sh
index 1f8e34c42..c5a7fe4a0 100755
--- a/src/gns/test_gns_gns2dns_zkey_lookup.sh
+++ b/src/gns/test_gns_gns2dns_zkey_lookup.sh
@@ -17,9 +17,11 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
17# IP address of 'docs.gnunet.org' 17# IP address of 'docs.gnunet.org'
18TEST_IP_ALT2="147.87.255.218" 18TEST_IP_ALT2="147.87.255.218"
19# IP address of 'www.gnunet.org' 19# IP address of 'www.gnunet.org'
20TEST_IP="131.159.74.67" 20TEST_IP="147.87.255.218"
21# IP address of 'www.gnunet.org'
22TEST_IP_ALT="131.159.74.67"
21# IPv6 address of 'gnunet.org' 23# IPv6 address of 'gnunet.org'
22TEST_IP6="2001:4ca0:2001:42:225:90ff:fe6b:d60" 24TEST_IP6="2a07:6b47:100:464::9357:ffdb"
23# permissive DNS resolver we will use for the test 25# permissive DNS resolver we will use for the test
24TEST_IP_GNS2DNS="8.8.8.8" 26TEST_IP_GNS2DNS="8.8.8.8"
25 27
@@ -46,7 +48,7 @@ which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15"
46 48
47gnunet-arm -s -c test_gns_lookup.conf 49gnunet-arm -s -c test_gns_lookup.conf
48 50
49OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` 51OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf www.gnunet.org`
50echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; } 52echo $OUT | grep $TEST_IP - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv4 for gnunet.org not found ($OUT), skipping test"; exit 77; }
51echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; } 53echo $OUT | grep $TEST_IP6 - > /dev/null || { gnunet-arm -e -c test_gns_lookup.conf ; echo "IPv6 for gnunet.org not found ($OUT), skipping test"; exit 77; }
52 54
@@ -66,7 +68,7 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V $TEST_RECOR
66# lookup 'www.gnunet.org', IPv4 68# lookup 'www.gnunet.org', IPv4
67RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf` 69RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t A -c test_gns_lookup.conf`
68# lookup 'www.gnunet.org', IPv6 70# lookup 'www.gnunet.org', IPv6
69RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf` 71RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t AAAA -c test_gns_lookup.conf | head -n1`
70# lookup 'gnunet.org', IPv4 72# lookup 'gnunet.org', IPv4
71RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf` 73RES_IP_ALT=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_ALT -t A -c test_gns_lookup.conf`
72# lookup 'docs.gnunet.org', IPv4 74# lookup 'docs.gnunet.org', IPv4
@@ -96,7 +98,7 @@ else
96 ret=1 98 ret=1
97fi 99fi
98 100
99if echo "$RES_IP_ALT" | grep "$TEST_IP" > /dev/null 101if echo "$RES_IP_ALT" | grep "$TEST_IP_ALT" > /dev/null
100then 102then
101 echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." 103 echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT."
102else 104else