diff options
Diffstat (limited to 'src/gns/test_gns_nick_shorten.sh')
-rwxr-xr-x | src/gns/test_gns_nick_shorten.sh | 14 |
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 | |||
3 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 3 | which 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 ] | |||
12 | then | 12 | then |
13 | LOCATION="gnunet-config" | 13 | LOCATION="gnunet-config" |
14 | fi | 14 | fi |
15 | $LOCATION --version | 15 | $LOCATION --version &> /dev/null |
16 | if test $? != 0 | 16 | if test $? != 0 |
17 | then | 17 | then |
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 |
20 | fi | 20 | fi |
21 | 21 | ||
@@ -47,7 +47,7 @@ echo "Adding nick names for identities" | |||
47 | gnunet-namestore -z testego -i $TEST_NICK_EGO -c $TEST_CONFIG | 47 | gnunet-namestore -z testego -i $TEST_NICK_EGO -c $TEST_CONFIG |
48 | gnunet-namestore -z delegatedego -i $TEST_NICK_DELEGATED -c $TEST_CONFIG | 48 | gnunet-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 |
51 | echo "Adding www record with IP $TEST_IP" | 51 | echo "Adding www record with IP $TEST_IP" |
52 | gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c test_gns_nick_shorten.conf | 52 | gnunet-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 | |||
94 | else | 94 | else |
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 |
97 | fi | 97 | fi |
98 | 98 | ||
99 | if [ $RES -eq 0 ] | 99 | if [ $RES -eq 0 ] |
100 | then | 100 | then |
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 |