diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-10-11 16:17:23 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-10-11 16:17:23 +0200 |
commit | 47ab1ded5ef79da36c4e769fae7fba2af84405d7 (patch) | |
tree | 67478607e9c1ff37402a8eff6ddd0f6dd83b91f1 | |
parent | 559daabee673134f03d76f16d25c1e0ef23b4fdc (diff) | |
download | gnunet-47ab1ded5ef79da36c4e769fae7fba2af84405d7.tar.gz gnunet-47ab1ded5ef79da36c4e769fae7fba2af84405d7.zip |
add namestore rest tests
-rwxr-xr-x | src/gns/test_plugin_rest_gns.sh | 7 | ||||
-rw-r--r-- | src/namestore/Makefile.am | 7 | ||||
-rwxr-xr-x | src/namestore/test_plugin_rest_namestore.sh | 195 |
3 files changed, 101 insertions, 108 deletions
diff --git a/src/gns/test_plugin_rest_gns.sh b/src/gns/test_plugin_rest_gns.sh index 09f155e01..da46330d6 100755 --- a/src/gns/test_plugin_rest_gns.sh +++ b/src/gns/test_plugin_rest_gns.sh | |||
@@ -23,7 +23,7 @@ curl_get () { | |||
23 | #$1 is link | 23 | #$1 is link |
24 | #$2 is grep | 24 | #$2 is grep |
25 | cache="$(gnurl -v "$1" 2>&1 | grep "$2")" | 25 | cache="$(gnurl -v "$1" 2>&1 | grep "$2")" |
26 | echo "$cache" | 26 | #echo "$cache" |
27 | if [ "" == "$cache" ] | 27 | if [ "" == "$cache" ] |
28 | then | 28 | then |
29 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 | 29 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 |
@@ -34,9 +34,6 @@ curl_get () { | |||
34 | TEST_TLD="testtld" | 34 | TEST_TLD="testtld" |
35 | 35 | ||
36 | gnunet-arm -s -c test_gns_lookup.conf | 36 | gnunet-arm -s -c test_gns_lookup.conf |
37 | gnunet-arm -I | ||
38 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 | ||
39 | |||
40 | curl_get "$gns_link/www.$TEST_TLD" "error" | 37 | curl_get "$gns_link/www.$TEST_TLD" "error" |
41 | 38 | ||
42 | gnunet-identity -C "$TEST_TLD" -c test_gns_lookup.conf | 39 | gnunet-identity -C "$TEST_TLD" -c test_gns_lookup.conf |
@@ -67,5 +64,5 @@ gnunet-namestore -z "$TEST_TLD" -d -n www -c test_gns_lookup.conf | |||
67 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 | 64 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 |
68 | 65 | ||
69 | curl_get "$gns_link/www1.$TEST_TLD" "error" | 66 | curl_get "$gns_link/www1.$TEST_TLD" "error" |
70 | 67 | gnunet-arm -e -c -c test_gns_lookup.conf | |
71 | exit 0 | 68 | exit 0 |
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index b9fa83103..646effd9b 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -681,6 +681,13 @@ check_SCRIPTS = \ | |||
681 | test_namestore_lookup.sh \ | 681 | test_namestore_lookup.sh \ |
682 | test_namestore_delete.sh | 682 | test_namestore_delete.sh |
683 | 683 | ||
684 | if HAVE_MHD | ||
685 | if HAVE_JSON | ||
686 | check_SCRIPTS += \ | ||
687 | test_plugin_rest_namestore.sh | ||
688 | endif | ||
689 | endif | ||
690 | |||
684 | EXTRA_DIST = \ | 691 | EXTRA_DIST = \ |
685 | test_common.c \ | 692 | test_common.c \ |
686 | test_namestore_api.conf \ | 693 | test_namestore_api.conf \ |
diff --git a/src/namestore/test_plugin_rest_namestore.sh b/src/namestore/test_plugin_rest_namestore.sh index 532c7caae..f3a4b7c49 100755 --- a/src/namestore/test_plugin_rest_namestore.sh +++ b/src/namestore/test_plugin_rest_namestore.sh | |||
@@ -1,44 +1,65 @@ | |||
1 | #!/usr/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | ||
2 | 3 | ||
3 | #First, start gnunet-arm and the rest-service. | 4 | LOCATION=$(which gnunet-config) |
4 | #Exit 0 means success, exit 1 means failed test | 5 | if [ -z $LOCATION ] |
6 | then | ||
7 | LOCATION="gnunet-config" | ||
8 | fi | ||
9 | $LOCATION --version 1> /dev/null | ||
10 | if test $? != 0 | ||
11 | then | ||
12 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | ||
13 | exit 77 | ||
14 | fi | ||
15 | |||
16 | rm -rf `gnunet-config -c test_namestore_api.conf -f -s paths -o GNUNET_TEST_HOME` | ||
5 | 17 | ||
6 | namestore_link="http://localhost:7776/namestore" | 18 | namestore_link="http://localhost:7776/namestore" |
7 | wrong_link="http://localhost:7776/namestoreandmore" | 19 | wrong_link="http://localhost:7776/namestoreandmore" |
8 | 20 | ||
9 | 21 | ||
10 | curl_get () { | 22 | curl_get () { |
11 | #$1 is link | 23 | #$1 is link |
12 | #$2 is grep | 24 | #$2 is grep |
13 | cache="$(curl -v "$1" 2>&1 | grep "$2")" | 25 | resp=$(curl -v "$1" 2>&1) |
14 | echo $cache | 26 | cache="$(echo $resp | grep "$2")" |
15 | if [ "" == "$cache" ] | 27 | #echo $cache |
16 | then | 28 | if [ "" == "$cache" ] |
17 | exit 1 | 29 | then |
18 | fi | 30 | echo "Error in get response: $resp, expected $2" |
31 | gnunet-arm -e -c test_namestore_api.conf | ||
32 | exit 1 | ||
33 | fi | ||
19 | } | 34 | } |
20 | 35 | ||
21 | curl_post () { | 36 | curl_post () { |
22 | #$1 is link | 37 | #$1 is link |
23 | #$2 is data | 38 | #$2 is data |
24 | #$3 is grep | 39 | #$3 is grep |
25 | cache="$(curl -v -X "POST" "$1" --data "$2" 2>&1 | grep "$3")" | 40 | resp=$(curl -v -X "POST" "$1" --data "$2" 2>&1) |
26 | echo $cache | 41 | cache="$(echo $resp | grep "$3")" |
27 | if [ "" == "$cache" ] | 42 | #echo $cache |
28 | then | 43 | if [ "" == "$cache" ] |
29 | exit 1 | 44 | then |
30 | fi | 45 | echo "Error in post response: $resp ($2), expected $3" |
46 | gnunet-arm -e -c test_namestore_api.conf | ||
47 | exit 1 | ||
48 | fi | ||
31 | } | 49 | } |
32 | 50 | ||
33 | curl_delete () { | 51 | curl_delete () { |
34 | #$1 is link | 52 | #$1 is link |
35 | #$2 is grep | 53 | #$2 is grep |
36 | cache="$(curl -v -X "DELETE" "$1" 2>&1 | grep "$2")" | 54 | resp=$(curl -v -X "DELETE" "$1" 2>&1) |
37 | echo $cache | 55 | cache="$(echo $resp | grep "$2")" |
38 | if [ "" == "$cache" ] | 56 | #echo $cache |
39 | then | 57 | if [ "" == "$cache" ] |
40 | exit 1 | 58 | then |
41 | fi | 59 | echo "Error in delete response: $resp, expected $2" |
60 | gnunet-arm -e -c test_namestore_api.conf | ||
61 | exit 1 | ||
62 | fi | ||
42 | } | 63 | } |
43 | 64 | ||
44 | # curl_put () { | 65 | # curl_put () { |
@@ -55,93 +76,61 @@ curl_delete () { | |||
55 | 76 | ||
56 | #Test subsystem default identity | 77 | #Test subsystem default identity |
57 | 78 | ||
79 | TEST_ID="test" | ||
80 | gnunet-arm -s -c test_namestore_api.conf | ||
81 | gnunet-arm -i rest -c test_namestore_api.conf | ||
58 | #Test GET | 82 | #Test GET |
59 | gnunet-identity -D "test_plugin_rest_namestore" | 83 | gnunet-identity -C $TEST_ID -c test_namestore_api.conf |
60 | gnunet-identity -C "test_plugin_rest_namestore" | 84 | test="$(gnunet-namestore -D -z $TEST_ID -c test_namestore_api.conf)" |
61 | test="$(gnunet-namestore -D -z "test_plugin_rest_namestore")" | 85 | name=$TEST_ID |
62 | name="test_plugin_rest_namestore" | 86 | public="$(gnunet-identity -d -c test_namestore_api.conf | grep $TEST_ID | awk 'NR==1{print $3}')" |
63 | public="$(gnunet-identity -d | grep "test_plugin_rest_namestore" | awk 'NR==1{print $3}')" | 87 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf |
64 | if [ "" == "$test" ] | ||
65 | then | ||
66 | #if no entries for test_plugin_rest_namestore | ||
67 | curl_get "${namestore_link}/$name" "error" | ||
68 | curl_get "${namestore_link}/" "error" | ||
69 | curl_get "${namestore_link}/$public" "error" | ||
70 | else | ||
71 | #if entries exists (that should not be possible) | ||
72 | curl_get "${namestore_link}" "HTTP/1.1 200 OK" | ||
73 | curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK" | ||
74 | curl_get "${namestore_link}/" "error" | ||
75 | curl_get "${namestore_link}/$public" "error" | ||
76 | fi | ||
77 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" | ||
78 | curl_get "${namestore_link}" "HTTP/1.1 200 OK" | 88 | curl_get "${namestore_link}" "HTTP/1.1 200 OK" |
79 | curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK" | 89 | curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK" |
80 | curl_get "${namestore_link}/" "error" | ||
81 | curl_get "${namestore_link}/$public" "error" | 90 | curl_get "${namestore_link}/$public" "error" |
82 | gnunet-namestore -z $name -d -n "test_entry" | 91 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf |
83 | 92 | ||
84 | #Test POST with NAME | 93 | #Test POST with NAME |
85 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 94 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204 No Content" |
86 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 95 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
87 | #value | 96 | |
88 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "error" | 97 | # invalid values |
89 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 98 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "error" |
90 | curl_post "${namestore_link}/$name" '{"value":"", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "error" | 99 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
91 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 100 | |
92 | curl_post "${namestore_link}/$name" '{"value_missing":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "error" | 101 | |
93 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 102 | curl_post "${namestore_link}/$name" '{"data": [{"value":"", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name"}]:"test_entry"}' "error" |
94 | #time | 103 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
95 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"0d","flag":0,"record_name":"test_entry"}' "HTTP/1.1 204" | 104 | |
96 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 105 | curl_post "${namestore_link}/$name" '{"data": [{"record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "error" |
97 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"10000d","flag":0,"record_name":"test_entry"}' "HTTP/1.1 204" | 106 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
98 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 107 | |
99 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"now","flag":0,"record_name":"test_entry"}' "error" | 108 | #expirations |
100 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 109 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"0d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204" |
101 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"","flag":0,"record_name":"test_entry"}' "error" | 110 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
102 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 111 | |
103 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time_missing":"1d","flag":0,"record_name":"test_entry"}' "error" | 112 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"10000d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204" |
104 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 113 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
105 | #flag | 114 | |
106 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 115 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"now","flag":0}],"record_name":"test_entry"}' "error" |
107 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 116 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
108 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":2,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 117 | |
109 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 118 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time_missing":"1d","flag":0}],"record_name":"test_entry"}' "error" |
110 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":8,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 119 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
111 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 120 | |
112 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":16,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | ||
113 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
114 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":-1,"record_name":"test_entry"}' "error" | ||
115 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
116 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":"Test","record_name":"test_entry"}' "error" | ||
117 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
118 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":,"record_name":"test_entry"}' "error" | ||
119 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
120 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag_missing":0,"record_name":"test_entry"}' "error" | ||
121 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
122 | #record_name | 121 | #record_name |
123 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 122 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":""}' "error" |
124 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "HTTP/1.1 204 No Content" | 123 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
125 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | 124 | curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name_missing":"test_entry"}' "error" |
126 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":""}' "error" | 125 | gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 |
127 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
128 | curl_post "${namestore_link}/$name" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name_missing":"test_entry"}' "error" | ||
129 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
130 | |||
131 | #wrong zone | ||
132 | curl_post "${namestore_link}/$public" '{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0,"record_name":"test_entry"}' "error" | ||
133 | gnunet-namestore -z $name -d -n "test_entry" > /dev/null 2>&1 | ||
134 | 126 | ||
135 | #Test DELETE | 127 | #Test DELETE |
136 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" | 128 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf |
137 | curl_delete "${namestore_link}/$name?record_name=test_entry" "HTTP/1.1 204" | 129 | curl_delete "${namestore_link}/$name?record_name=test_entry" "HTTP/1.1 204" |
138 | curl_delete "${namestore_link}/$name?record_name=test_entry" "error" | 130 | curl_delete "${namestore_link}/$name?record_name=test_entry" "error" |
139 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" | 131 | gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf |
140 | curl_delete "${namestore_link}/$public?record_name=test_entry" "error" | 132 | curl_delete "${namestore_link}/$public?record_name=test_entry" "error" |
141 | 133 | ||
142 | 134 | gnunet-arm -e -c test_namestore_api.conf | |
143 | #Test default identity | ||
144 | #not possible without defining | ||
145 | |||
146 | exit 0; | 135 | exit 0; |
147 | 136 | ||