diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2013-09-27 11:28:51 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2013-09-27 11:28:51 +0000 |
commit | 9466529278dab44485f7279213af36d84a5cf770 (patch) | |
tree | 1659a2f5bbbde373452a7eb81928a3dfe8a752d8 /src | |
parent | 1f6ae3b334a5a719f693d1b71f084d2ca612e9f5 (diff) | |
download | gnunet-9466529278dab44485f7279213af36d84a5cf770.tar.gz gnunet-9466529278dab44485f7279213af36d84a5cf770.zip |
-more tests
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/Makefile.am | 2 | ||||
-rwxr-xr-x | src/gns/test_gns_delegated_lookup.sh | 1 | ||||
-rwxr-xr-x | src/gns/test_gns_ipv6_lookup.sh | 20 | ||||
-rwxr-xr-x | src/gns/test_gns_txt_lookup.sh | 20 |
4 files changed, 43 insertions, 0 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 754f0ae18..069f24188 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -198,6 +198,8 @@ libgnunet_plugin_block_gns_la_DEPENDENCIES = \ | |||
198 | check_SCRIPTS = \ | 198 | check_SCRIPTS = \ |
199 | test_gns_delegated_lookup.sh \ | 199 | test_gns_delegated_lookup.sh \ |
200 | test_gns_lookup.sh \ | 200 | test_gns_lookup.sh \ |
201 | test_gns_ipv6_lookup.sh\ | ||
202 | test_gns_txt_lookup.sh\ | ||
201 | test_gns_mx_lookup.sh \ | 203 | test_gns_mx_lookup.sh \ |
202 | test_gns_cname_lookup.sh | 204 | test_gns_cname_lookup.sh |
203 | 205 | ||
diff --git a/src/gns/test_gns_delegated_lookup.sh b/src/gns/test_gns_delegated_lookup.sh index 83710d28b..d68464bc0 100755 --- a/src/gns/test_gns_delegated_lookup.sh +++ b/src/gns/test_gns_delegated_lookup.sh | |||
@@ -18,5 +18,6 @@ if [ "$RES_IP" == "$TEST_IP" ] | |||
18 | then | 18 | then |
19 | exit 0 | 19 | exit 0 |
20 | else | 20 | else |
21 | echo "Failed to resolve to proper IP, got $RES_IP." | ||
21 | exit 1 | 22 | exit 1 |
22 | fi | 23 | fi |
diff --git a/src/gns/test_gns_ipv6_lookup.sh b/src/gns/test_gns_ipv6_lookup.sh new file mode 100755 index 000000000..878ca2f85 --- /dev/null +++ b/src/gns/test_gns_ipv6_lookup.sh | |||
@@ -0,0 +1,20 @@ | |||
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 | ||
diff --git a/src/gns/test_gns_txt_lookup.sh b/src/gns/test_gns_txt_lookup.sh new file mode 100755 index 000000000..ac8bc7e45 --- /dev/null +++ b/src/gns/test_gns_txt_lookup.sh | |||
@@ -0,0 +1,20 @@ | |||
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_TXT="GNS powered txt record data" | ||
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 testtxt -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf | ||
9 | RES_TXT=`$DO_TIMEOUT gnunet-gns --raw -z testego -u testtxt.gnu -t TXT -c test_gns_lookup.conf` | ||
10 | gnunet-namestore -z testego -d -n testtxt -t TXT -V "$TEST_TXT" -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_TXT" == "$TEST_TXT" ] | ||
15 | then | ||
16 | exit 0 | ||
17 | else | ||
18 | echo "Failed to resolve to proper TXT, got $RES_TXT." | ||
19 | exit 1 | ||
20 | fi | ||