diff options
author | ng0 <ng0@n0.is> | 2019-04-04 13:37:20 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-04-04 13:37:20 +0000 |
commit | d58a715b3d210aec6e3c70ca48fa905e56ef4e19 (patch) | |
tree | 88d5096e07136aa64d838997dd5aacb123d12a22 /src/namestore/test_namestore_lookup.sh | |
parent | 2fd1e4520a7622fc5aef0f3ca667d3d7304b9606 (diff) | |
parent | 13888754485d711b8088bc24969df85acb7f2ede (diff) | |
download | gnunet-d58a715b3d210aec6e3c70ca48fa905e56ef4e19.tar.gz gnunet-d58a715b3d210aec6e3c70ca48fa905e56ef4e19.zip |
Merge branch 'master' of gnunet.org:gnunet
Diffstat (limited to 'src/namestore/test_namestore_lookup.sh')
-rwxr-xr-x | src/namestore/test_namestore_lookup.sh | 28 |
1 files changed, 10 insertions, 18 deletions
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" | |||
19 | TEST_RECORD_NAME_DNS="www3" | 19 | TEST_RECORD_NAME_DNS="www3" |
20 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 20 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" |
21 | 21 | ||
22 | function start_peer | 22 | # start peer |
23 | { | 23 | gnunet-arm -s -c $CONFIGURATION |
24 | gnunet-arm -s -c $CONFIGURATION | 24 | gnunet-identity -C testego -c $CONFIGURATION |
25 | gnunet-identity -C testego -c $CONFIGURATION | ||
26 | } | ||
27 | 25 | ||
28 | function stop_peer | ||
29 | { | ||
30 | gnunet-identity -D testego -c $CONFIGURATION | ||
31 | gnunet-arm -e -c $CONFIGURATION | ||
32 | } | ||
33 | |||
34 | |||
35 | start_peer | ||
36 | # Create a public record | 26 | # Create a public record |
37 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t A -V $TEST_IP_PLUS -e never -c $CONFIGURATION | 27 | gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_DNS -t A -V $TEST_IP_PLUS -e never -c $CONFIGURATION |
38 | NAMESTORE_RES=$? | 28 | NAMESTORE_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 | 45 | done |
56 | stop_peer | 46 | # stop peer |
47 | gnunet-identity -D testego -c $CONFIGURATION | ||
48 | gnunet-arm -e -c $CONFIGURATION | ||
57 | 49 | ||
58 | 50 | ||
59 | if [ $FOUND_NAME == true -a $FOUND_IP == true ] | 51 | if [ $FOUND_NAME = true -a $FOUND_IP = true ] |
60 | then | 52 | then |
61 | echo "PASS: Lookup name in namestore" | 53 | echo "PASS: Lookup name in namestore" |
62 | exit 0 | 54 | exit 0 |
63 | elif [ $FOUND_NAME == false ] | 55 | elif [ $FOUND_NAME = false ] |
64 | then | 56 | then |
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 |
67 | elif [ $FOUND_IP == false ] | 59 | elif [ $FOUND_IP = false ] |
68 | then | 60 | then |
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 |