aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_quickupdate.sh
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2013-10-20 14:35:47 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2013-10-20 14:35:47 +0000
commit1907190af59e4b093bac391a4b8b9637e67d2b48 (patch)
treee7b70c5feb6c8823417ce255bb0dc0383279fd46 /src/gns/test_gns_quickupdate.sh
parentbfa5f9626c0e5df1bd832ce0fa3b17bbf7b6d8c6 (diff)
downloadgnunet-1907190af59e4b093bac391a4b8b9637e67d2b48.tar.gz
gnunet-1907190af59e4b093bac391a4b8b9637e67d2b48.zip
-quick put test
Diffstat (limited to 'src/gns/test_gns_quickupdate.sh')
-rwxr-xr-xsrc/gns/test_gns_quickupdate.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gns/test_gns_quickupdate.sh b/src/gns/test_gns_quickupdate.sh
new file mode 100755
index 000000000..f74c1c9a7
--- /dev/null
+++ b/src/gns/test_gns_quickupdate.sh
@@ -0,0 +1,26 @@
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 GNUNET_HOME -f`
4which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
5TEST_IP="127.0.0.1"
6gnunet-arm -s -c test_gns_lookup.conf
7gnunet-identity -C testego -c test_gns_lookup.conf
8gnunet-identity -C delegatedego -c test_gns_lookup.conf
9DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego | awk '{print $3}')
10gnunet-namestore -p -z testego -a -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
11sleep 1
12gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
13gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
14RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.b.gnu -t A -c test_gns_lookup.conf`
15gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
16gnunet-identity -D testego -c test_gns_lookup.conf
17gnunet-identity -D delegatedego -c test_gns_lookup.conf
18gnunet-arm -e -c test_gns_lookup.conf
19
20if [ "$RES_IP" == "$TEST_IP" ]
21then
22 exit 0
23else
24 echo "Failed to properly resolve IP, got $RES_IP."
25 exit 1
26fi