-ensure external symbols have proper prefix for conversation service
[oweals/gnunet.git] / src / gns / test_gns_ipv6_lookup.sh
1 #!/bin/bash
2 trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3 rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME`
4 which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
5 TEST_IP="dead::beef"
6 gnunet-arm -s -c test_gns_lookup.conf
7 gnunet-identity -C testego -c test_gns_lookup.conf
8 gnunet-namestore -p -z testego -a -n www -t AAAA -V $TEST_IP -e never -c test_gns_lookup.conf
9 RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t AAAA -c test_gns_lookup.conf`
10 gnunet-namestore -z testego -d -n www -t AAAA -V $TEST_IP -e never -c test_gns_lookup.conf
11 gnunet-identity -D testego -c test_gns_lookup.conf
12 gnunet-arm -e -c test_gns_lookup.conf
13
14 if [ "$RES_IP" == "$TEST_IP" ]
15 then
16   exit 0
17 else
18   echo "Failed to resolve to proper IP, got $RES_IP."
19   exit 1
20 fi