aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-11-14 13:22:58 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-11-14 13:22:58 +0000
commit2f2bb87a1f8611860ae8d5cecbf6ace135749085 (patch)
tree2168baf6a5511a4098c1e26e92941948a95e7afc /src/gns
parentdd640f62b529261629b19a3c972ebea36e90b5ee (diff)
downloadgnunet-2f2bb87a1f8611860ae8d5cecbf6ace135749085.tar.gz
gnunet-2f2bb87a1f8611860ae8d5cecbf6ace135749085.zip
remove
Diffstat (limited to 'src/gns')
-rwxr-xr-xsrc/gns/test_gns_pseu_shorten.sh50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gns/test_gns_pseu_shorten.sh b/src/gns/test_gns_pseu_shorten.sh
deleted file mode 100755
index b0ae5ebf5..000000000
--- a/src/gns/test_gns_pseu_shorten.sh
+++ /dev/null
@@ -1,50 +0,0 @@
1#!/bin/bash
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
4
5rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
6TEST_IP="127.0.0.1"
7TEST_PSEU="alice"
8TEST_NAME="www.mybestfriendalice.gnu"
9TEST_NAME_SHORT="www.alice.short.gnu"
10gnunet-arm -s -c test_gns_lookup.conf
11DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego | awk '{print $3}')
12gnunet-identity -c test_gns_lookup.conf -d
13gnunet-identity -C short-zone -c test_gns_lookup.conf
14gnunet-identity -C delegatedego -c test_gns_lookup.conf
15gnunet-identity -e short-zone -s gns-short -c test_gns_lookup.conf
16gnunet-identity -C testego -c test_gns_lookup.conf -c test_gns_lookup.conf
17DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep delegatedego | awk '{print $3}')
18SHORT=$(gnunet-identity -c test_gns_lookup.conf -d | grep short-zone | awk '{print $3}')
19gnunet-namestore -p -z testego -a -n mybestfriendalice -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
20gnunet-namestore -p -z testego -a -n short -t PKEY -V $SHORT -e never -c test_gns_lookup.conf
21gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
22gnunet-namestore -p -z delegatedego -a -n "+" -t PSEU -V $TEST_PSEU -e never -c test_gns_lookup.conf
23# Force start of GNS
24gnunet-arm -c test_gns_lookup.conf -i gns
25# need to sleep here, to give PSEU record chance to be copied to DHT
26sleep 1
27RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME -t A -c test_gns_lookup.conf`
28# need to sleep here, as shortening happens asynchronously...
29sleep 1
30RES_IP_PSEU=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.alice.short.gnu -t A -c test_gns_lookup.conf`
31gnunet-namestore -z testego -d -n mybestfriendalice -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf
32gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
33gnunet-arm -e -c test_gns_lookup.conf
34
35if [ "$RES_IP" == "$TEST_IP" ]
36then
37 echo "PASS: Resolved $TEST_NAME properly to $RES_IP."
38else
39 echo "FAIL: Could not resolve $TEST_NAME to proper IP, got $RES_IP."
40 exit 1
41fi
42
43if [ "$RES_IP_PSEU" == "$TEST_IP" ]
44then
45 echo "PASS: Resolved $TEST_NAME_SHORT properly to $RES_IP."
46 exit 0
47else
48 echo "FAIL: Could not resolve $TEST_NAME_SHORT to proper IP, got $RES_IP_PSEU."
49 exit 1
50fi