aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_txt_lookup.sh
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2013-09-27 11:28:51 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2013-09-27 11:28:51 +0000
commit9466529278dab44485f7279213af36d84a5cf770 (patch)
tree1659a2f5bbbde373452a7eb81928a3dfe8a752d8 /src/gns/test_gns_txt_lookup.sh
parent1f6ae3b334a5a719f693d1b71f084d2ca612e9f5 (diff)
downloadgnunet-9466529278dab44485f7279213af36d84a5cf770.tar.gz
gnunet-9466529278dab44485f7279213af36d84a5cf770.zip
-more tests
Diffstat (limited to 'src/gns/test_gns_txt_lookup.sh')
-rwxr-xr-xsrc/gns/test_gns_txt_lookup.sh20
1 files changed, 20 insertions, 0 deletions
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
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME`
4which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
5TEST_TXT="GNS powered txt record data"
6gnunet-arm -s -c test_gns_lookup.conf
7gnunet-identity -C testego -c test_gns_lookup.conf
8gnunet-namestore -p -z testego -a -n testtxt -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf
9RES_TXT=`$DO_TIMEOUT gnunet-gns --raw -z testego -u testtxt.gnu -t TXT -c test_gns_lookup.conf`
10gnunet-namestore -z testego -d -n testtxt -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf
11gnunet-identity -D testego -c test_gns_lookup.conf
12gnunet-arm -e -c test_gns_lookup.conf
13
14if [ "$RES_TXT" == "$TEST_TXT" ]
15then
16 exit 0
17else
18 echo "Failed to resolve to proper TXT, got $RES_TXT."
19 exit 1
20fi