diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-06 21:06:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-06 21:06:17 +0000 |
commit | 50c0d1710d77f3224c32dac21d5d01cc3c2122ec (patch) | |
tree | 0c959dac2f54e49a76d838438c409a4bc5d42802 | |
parent | e7d53de20be5b3ce852bfac50e66b978e46f1d2d (diff) | |
download | gnunet-50c0d1710d77f3224c32dac21d5d01cc3c2122ec.tar.gz gnunet-50c0d1710d77f3224c32dac21d5d01cc3c2122ec.zip |
-allow tests to pass if system is offline
-rwxr-xr-x | src/gns/test_gns_gns2dns_lookup.sh | 6 | ||||
-rwxr-xr-x | src/gns/test_gns_soa_lookup.sh | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gns/test_gns_gns2dns_lookup.sh b/src/gns/test_gns_gns2dns_lookup.sh index fe5e2132d..5bd33221a 100755 --- a/src/gns/test_gns_gns2dns_lookup.sh +++ b/src/gns/test_gns_gns2dns_lookup.sh | |||
@@ -17,6 +17,12 @@ TEST_DOMAIN="www.${TEST_RECORD_NAME}.gnu" | |||
17 | TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.gnu" | 17 | TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.gnu" |
18 | TEST_DOMAIN_ALT2="uk.${TEST_RECORD_NAME}.gnu" | 18 | TEST_DOMAIN_ALT2="uk.${TEST_RECORD_NAME}.gnu" |
19 | 19 | ||
20 | if ! nslookup gnunet.org $TEST_IP_GNS2DNS &> /dev/null | ||
21 | then | ||
22 | echo "Cannot reach DNS, skipping test" | ||
23 | exit 0 | ||
24 | fi | ||
25 | |||
20 | # helper record for pointing to the DNS resolver | 26 | # helper record for pointing to the DNS resolver |
21 | TEST_RESOLVER_LABEL="resolver" | 27 | TEST_RESOLVER_LABEL="resolver" |
22 | # GNS2DNS record value: delegate to DNS domain 'gnunet.org' | 28 | # GNS2DNS record value: delegate to DNS domain 'gnunet.org' |
diff --git a/src/gns/test_gns_soa_lookup.sh b/src/gns/test_gns_soa_lookup.sh index 0709bb139..526093c71 100755 --- a/src/gns/test_gns_soa_lookup.sh +++ b/src/gns/test_gns_soa_lookup.sh | |||
@@ -2,9 +2,17 @@ | |||
2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
3 | rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` | 3 | rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` |
4 | TEST_DOMAIN="homepage.gnu" | 4 | TEST_DOMAIN="homepage.gnu" |
5 | # some public DNS resolver we can use | ||
5 | TEST_IP_GNS2DNS="184.172.157.218" | 6 | TEST_IP_GNS2DNS="184.172.157.218" |
6 | TEST_RECORD_NAME="homepage" | 7 | TEST_RECORD_NAME="homepage" |
7 | TEST_RECORD_GNS2DNS="gnunet.org" | 8 | TEST_RECORD_GNS2DNS="gnunet.org" |
9 | |||
10 | if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS &> /dev/null | ||
11 | then | ||
12 | echo "Cannot reach DNS, skipping test" | ||
13 | exit 0 | ||
14 | fi | ||
15 | |||
8 | gnunet-arm -s -c test_gns_lookup.conf | 16 | gnunet-arm -s -c test_gns_lookup.conf |
9 | gnunet-identity -C testego -c test_gns_lookup.conf | 17 | gnunet-identity -C testego -c test_gns_lookup.conf |
10 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf | 18 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf |