aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/namestore/test_namestore_delete.sh6
-rwxr-xr-xsrc/namestore/test_namestore_lookup.sh28
-rwxr-xr-xsrc/namestore/test_namestore_put.sh2
3 files changed, 14 insertions, 22 deletions
diff --git a/src/namestore/test_namestore_delete.sh b/src/namestore/test_namestore_delete.sh
index 8c776104a..44ea1e66c 100755
--- a/src/namestore/test_namestore_delete.sh
+++ b/src/namestore/test_namestore_delete.sh
@@ -61,15 +61,15 @@ for LINE in $OUTPUT ;
61stop_peer 61stop_peer
62 62
63 63
64if [ $FOUND_NAME == false -a $FOUND_IP != false ] 64if [ $FOUND_NAME = false -a $FOUND_IP != false ]
65then 65then
66 echo "PASS: Delete name in namestore" 66 echo "PASS: Delete name in namestore"
67 exit 0 67 exit 0
68elif [ $FOUND_NAME == true ] 68elif [ $FOUND_NAME = true ]
69then 69then
70 echo "FAIL: Delete name in namestore: name returned" 70 echo "FAIL: Delete name in namestore: name returned"
71 exit 1 71 exit 1
72elif [ $FOUND_IP == true ] 72elif [ $FOUND_IP = true ]
73then 73then
74 echo "FAIL: Delete name in namestore: IP returned" 74 echo "FAIL: Delete name in namestore: IP returned"
75 exit 1 75 exit 1
diff --git a/src/namestore/test_namestore_lookup.sh b/src/namestore/test_namestore_lookup.sh
index 90735b17e..1c96e102a 100755
--- a/src/namestore/test_namestore_lookup.sh
+++ b/src/namestore/test_namestore_lookup.sh
@@ -19,20 +19,10 @@ TEST_IP_PLUS="127.0.0.1"
19TEST_RECORD_NAME_DNS="www3" 19TEST_RECORD_NAME_DNS="www3"
20which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 20which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
21 21
22function start_peer 22# start peer
23{ 23gnunet-arm -s -c $CONFIGURATION
24 gnunet-arm -s -c $CONFIGURATION 24gnunet-identity -C testego -c $CONFIGURATION
25 gnunet-identity -C testego -c $CONFIGURATION
26}
27 25
28function stop_peer
29{
30 gnunet-identity -D testego -c $CONFIGURATION
31 gnunet-arm -e -c $CONFIGURATION
32}
33
34
35start_peer
36# Create a public record 26# Create a public record
37gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t A -V $TEST_IP_PLUS -e never -c $CONFIGURATION 27gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t A -V $TEST_IP_PLUS -e never -c $CONFIGURATION
38NAMESTORE_RES=$? 28NAMESTORE_RES=$?
@@ -52,19 +42,21 @@ for LINE in $OUTPUT ;
52 FOUND_IP=true; 42 FOUND_IP=true;
53 #echo $FOUND_IP 43 #echo $FOUND_IP
54 fi 44 fi
55 done 45done
56stop_peer 46# stop peer
47gnunet-identity -D testego -c $CONFIGURATION
48gnunet-arm -e -c $CONFIGURATION
57 49
58 50
59if [ $FOUND_NAME == true -a $FOUND_IP == true ] 51if [ $FOUND_NAME = true -a $FOUND_IP = true ]
60then 52then
61 echo "PASS: Lookup name in namestore" 53 echo "PASS: Lookup name in namestore"
62 exit 0 54 exit 0
63elif [ $FOUND_NAME == false ] 55elif [ $FOUND_NAME = false ]
64then 56then
65 echo "FAIL: Lookup name in namestore: name not returned" 57 echo "FAIL: Lookup name in namestore: name not returned"
66 exit 1 58 exit 1
67elif [ $FOUND_IP == false ] 59elif [ $FOUND_IP = false ]
68then 60then
69 echo "FAIL: Lookup name in namestore: IP not returned" 61 echo "FAIL: Lookup name in namestore: IP not returned"
70 exit 1 62 exit 1
diff --git a/src/namestore/test_namestore_put.sh b/src/namestore/test_namestore_put.sh
index 6b6647d5f..eaf7d44b4 100755
--- a/src/namestore/test_namestore_put.sh
+++ b/src/namestore/test_namestore_put.sh
@@ -46,7 +46,7 @@ gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t A -V $TEST_IP_PLUS
46NAMESTORE_RES=$? 46NAMESTORE_RES=$?
47stop_peer 47stop_peer
48 48
49if [ $NAMESTORE_RES == 0 ] 49if [ $NAMESTORE_RES = 0 ]
50then 50then
51 echo "PASS: Creating name in namestore" 51 echo "PASS: Creating name in namestore"
52else 52else