diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-21 13:09:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-21 13:09:37 +0000 |
commit | 9dc126b6a047129630931aefe61e20454ef77c84 (patch) | |
tree | 2fd7021e9b91af01598c1da226850a50cb6dfa43 /src/gns | |
parent | be43f7044a162f6bafbdda12c7771d9de457b203 (diff) | |
download | gnunet-9dc126b6a047129630931aefe61e20454ef77c84.tar.gz gnunet-9dc126b6a047129630931aefe61e20454ef77c84.zip |
-better error reporting, use vars
Diffstat (limited to 'src/gns')
-rwxr-xr-x | src/gns/test_gns_cname_lookup.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh index c06cd2133..aef3f8138 100755 --- a/src/gns/test_gns_cname_lookup.sh +++ b/src/gns/test_gns_cname_lookup.sh | |||
@@ -41,9 +41,9 @@ gnunet-identity -C testego -c test_gns_lookup.conf | |||
41 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t CNAME -V $TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf | 41 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t CNAME -V $TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf |
42 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf | 42 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf |
43 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_CNAME_SERVER -t A -V $TEST_IP_PLUS -e never -c test_gns_lookup.conf | 43 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_CNAME_SERVER -t A -V $TEST_IP_PLUS -e never -c test_gns_lookup.conf |
44 | RES_CNAME=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf` | 44 | RES_CNAME=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN_PLUS -t A -c test_gns_lookup.conf` |
45 | RES_CNAME_RAW=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t CNAME -c test_gns_lookup.conf` | 45 | RES_CNAME_RAW=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN_PLUS -t CNAME -c test_gns_lookup.conf` |
46 | RES_CNAME_DNS=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www3.gnu -t A -c test_gns_lookup.conf` | 46 | RES_CNAME_DNS=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_DOMAIN_DNS -t A -c test_gns_lookup.conf` |
47 | TESTEGOZONE=`gnunet-identity -c test_gns_lookup.conf -d | awk '{print $3}'` | 47 | TESTEGOZONE=`gnunet-identity -c test_gns_lookup.conf -d | awk '{print $3}'` |
48 | gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_DNS -t CNAME -V $TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf | 48 | gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_DNS -t CNAME -V $TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf |
49 | gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf | 49 | gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf |
@@ -56,7 +56,7 @@ if [ "$RES_CNAME_RAW" == "server.$TESTEGOZONE.zkey" ] | |||
56 | then | 56 | then |
57 | echo "PASS: CNAME resulution from GNS" | 57 | echo "PASS: CNAME resulution from GNS" |
58 | else | 58 | else |
59 | echo "FAIL: CNAME resolution from GNS, got $RES_CNAME_RAW." | 59 | echo "FAIL: CNAME resolution from GNS, got $RES_CNAME_RAW, expected server.$TESTEGOZONE.zkey." |
60 | exit 1 | 60 | exit 1 |
61 | fi | 61 | fi |
62 | 62 | ||
@@ -64,7 +64,7 @@ if [ "$RES_CNAME" == "$TEST_IP_PLUS" ] | |||
64 | then | 64 | then |
65 | echo "PASS: IP resulution from GNS" | 65 | echo "PASS: IP resulution from GNS" |
66 | else | 66 | else |
67 | echo "FAIL: IP resolution from GNS, got $RES_CNAME." | 67 | echo "FAIL: IP resolution from GNS, got $RES_CNAME, expected $TEST_IP_PLUS." |
68 | exit 1 | 68 | exit 1 |
69 | fi | 69 | fi |
70 | 70 | ||
@@ -73,6 +73,6 @@ then | |||
73 | echo "PASS: IP resulution from DNS" | 73 | echo "PASS: IP resulution from DNS" |
74 | exit 0 | 74 | exit 0 |
75 | else | 75 | else |
76 | echo "FAIL: IP resulution from DNS, got $RES_IP." | 76 | echo "FAIL: IP resulution from DNS, got $RES_IP, expected $TEST_IP_DNS." |
77 | exit 1 | 77 | exit 1 |
78 | fi | 78 | fi |