-handle failure to load certs more nicely
[oweals/gnunet.git] / src / gns / test_gns_lookup.sh
1 #!/bin/bash
2
3 TEST_IP="127.0.0.1"
4
5 gnunet-arm -s -c test_gns_lookup.conf
6
7 gnunet-identity -C testego -c test_gns_lookup.conf
8
9 gnunet-namestore -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
10
11 RES_IP=$(gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf)
12
13 gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
14
15 gnunet-arm -e -c test_gns_lookup.conf
16
17 if [ "$RES_IP" == "$TEST_IP" ]
18 then
19   echo "OK"
20   exit 0
21 else
22   echo "Result $RES_IP NOTOK"
23   exit 1
24 fi
25