aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_nick_shorten.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_nick_shorten.sh')
-rwxr-xr-xsrc/gns/test_gns_nick_shorten.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gns/test_gns_nick_shorten.sh b/src/gns/test_gns_nick_shorten.sh
index 83fc20713..fef80b4d0 100755
--- a/src/gns/test_gns_nick_shorten.sh
+++ b/src/gns/test_gns_nick_shorten.sh
@@ -3,7 +3,7 @@ trap "gnunet-arm -e -c test_gns_nick_shorten.conf" SIGINT
3which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 3which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
4 4
5# This test tests shortening functionality based on NICK records: 5# This test tests shortening functionality based on NICK records:
6# 6#
7# zone "delegatedego": Alice's zone 7# zone "delegatedego": Alice's zone
8# zone "testego": Local zone with delegation to alice 8# zone "testego": Local zone with delegation to alice
9 9
@@ -12,10 +12,10 @@ if [ -z $LOCATION ]
12then 12then
13 LOCATION="gnunet-config" 13 LOCATION="gnunet-config"
14fi 14fi
15$LOCATION --version 15$LOCATION --version &> /dev/null
16if test $? != 0 16if test $? != 0
17then 17then
18 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" 18 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
19 exit 77 19 exit 77
20fi 20fi
21 21
@@ -47,7 +47,7 @@ echo "Adding nick names for identities"
47gnunet-namestore -z testego -i $TEST_NICK_EGO -c $TEST_CONFIG 47gnunet-namestore -z testego -i $TEST_NICK_EGO -c $TEST_CONFIG
48gnunet-namestore -z delegatedego -i $TEST_NICK_DELEGATED -c $TEST_CONFIG 48gnunet-namestore -z delegatedego -i $TEST_NICK_DELEGATED -c $TEST_CONFIG
49 49
50# Adding label www in Alice's delegatedego zone 50# Adding label www in Alice's delegatedego zone
51echo "Adding www record with IP $TEST_IP" 51echo "Adding www record with IP $TEST_IP"
52gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_nick_shorten.conf 52gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_nick_shorten.conf
53 53
@@ -94,12 +94,12 @@ then
94else 94else
95 echo "FAIL: Expected PKEY in $DELEGATED_PKEY, received PKEY $PKEY_SHORT_RES in master zone." 95 echo "FAIL: Expected PKEY in $DELEGATED_PKEY, received PKEY $PKEY_SHORT_RES in master zone."
96 RES=1 96 RES=1
97fi 97fi
98 98
99if [ $RES -eq 0 ] 99if [ $RES -eq 0 ]
100then 100then
101 RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME_SHORT -t A -c test_gns_nick_shorten.conf` 101 RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME_SHORT -t A -c test_gns_nick_shorten.conf`
102 if [ "$RES_IP" == "$TEST_IP" ] 102 if [ "$RES_IP" == "$TEST_IP" ]
103 then 103 then
104 echo "PASS: Received $TEST_IP for $TEST_NAME_SHORT" 104 echo "PASS: Received $TEST_IP for $TEST_NAME_SHORT"
105 else 105 else