diff options
author | Phil <phil.buschmann@tum.de> | 2018-08-11 14:21:58 +0200 |
---|---|---|
committer | Phil <phil.buschmann@tum.de> | 2018-08-11 14:21:58 +0200 |
commit | 4898de50936164f8adb067c4f32fab62bec92e19 (patch) | |
tree | 62b707d372685f2ebc8b56026caaa4f5238aa294 /src/identity/test_plugin_rest_identity.sh | |
parent | bcda92da22a3c1824f966d4593492e8a446fd070 (diff) | |
download | gnunet-4898de50936164f8adb067c4f32fab62bec92e19.tar.gz gnunet-4898de50936164f8adb067c4f32fab62bec92e19.zip |
split namespace of put request in identity rest api
Diffstat (limited to 'src/identity/test_plugin_rest_identity.sh')
-rwxr-xr-x | src/identity/test_plugin_rest_identity.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/identity/test_plugin_rest_identity.sh b/src/identity/test_plugin_rest_identity.sh index 3eac0950c..a5879dd7e 100755 --- a/src/identity/test_plugin_rest_identity.sh +++ b/src/identity/test_plugin_rest_identity.sh | |||
@@ -122,19 +122,18 @@ curl_put "${identity_link}/name/test_plugin_rest_identity1" '{"newname":"test_pl | |||
122 | curl_put "${identity_link}/name/test_plugin_rest_identity" '{"newnam":"test_plugin_rest_identityfail"}' "error" | 122 | curl_put "${identity_link}/name/test_plugin_rest_identity" '{"newnam":"test_plugin_rest_identityfail"}' "error" |
123 | 123 | ||
124 | #Test subsystem | 124 | #Test subsystem |
125 | curl_put "${identity_link}/name/test_plugin_rest_identity" '{"subsystem":"namestore"}' "HTTP/1.1 204" | 125 | curl_put "${identity_link}/subsystem/test_plugin_rest_identity" '{"subsystem":"namestore"}' "HTTP/1.1 204" |
126 | curl_put "${identity_link}/name/test_plugin_rest_identity" '{"subsystem":"namestore"}' "HTTP/1.1 204" | 126 | curl_put "${identity_link}/subsystem/test_plugin_rest_identity" '{"subsystem":"namestore"}' "HTTP/1.1 204" |
127 | curl_get "${identity_link}/subsystem/namestore" "test_plugin_rest_identity" | 127 | curl_get "${identity_link}/subsystem/namestore" "test_plugin_rest_identity" |
128 | curl_post "${identity_link}" '{"name":"test_plugin_rest_identity1"}' "HTTP/1.1 201 Created" | ||
129 | public="$(gnunet-identity -d | grep "test_plugin_rest_identity" | awk 'NR==1{print $3}')" | 128 | public="$(gnunet-identity -d | grep "test_plugin_rest_identity" | awk 'NR==1{print $3}')" |
130 | curl_put "${identity_link}/pubkey/$public" '{"subsystem":"namestore"}' "HTTP/1.1 204" | 129 | curl_put "${identity_link}/subsystem/$public" '{"subsystem":"namestore"}' "HTTP/1.1 404" |
131 | curl_get "${identity_link}/subsystem/namestore" "test_plugin_rest_identity1" | 130 | curl_post "${identity_link}" '{"name":"test_plugin_rest_identity1"}' "HTTP/1.1 201 Created" |
132 | curl_get "${identity_link}/subsystem/test_plugin_rest_identity_no_subsystem" "error" | 131 | curl_get "${identity_link}/subsystem/test_plugin_rest_identity_no_subsystem" "error" |
133 | curl_put "${identity_link}/name/test_plugin_rest_identity1" '{"subsystem":"test_plugin_rest_identity_no_subsystem"}' "HTTP/1.1 204" | 132 | curl_put "${identity_link}/subsystem/test_plugin_rest_identity1" '{"subsystem":"test_plugin_rest_identity_no_subsystem"}' "HTTP/1.1 204" |
134 | curl_get "${identity_link}/subsystem/test_plugin_rest_identity_no_subsystem" "test_plugin_rest_identity1" | 133 | curl_get "${identity_link}/subsystem/test_plugin_rest_identity_no_subsystem" "test_plugin_rest_identity1" |
135 | 134 | ||
136 | curl_put "${identity_link}/name/test_plugin_rest_identity1" '{"subsyste":"test_plugin_rest_identity_no_subsystem"}' "error" | 135 | curl_put "${identity_link}/subsystem/test_plugin_rest_identity1" '{"subsyste":"test_plugin_rest_identity_no_subsystem"}' "error" |
137 | curl_put "${identity_link}/name/test_plugin_rest_identity1" '{"subsystem":"test_plugin_rest_identity_no_subsystem"}' "HTTP/1.1 204" | 136 | curl_put "${identity_link}/subsystem/test_plugin_rest_identity1" '{"subsystem":"test_plugin_rest_identity_no_subsystem"}' "HTTP/1.1 204" |
138 | 137 | ||
139 | #Test DELETE | 138 | #Test DELETE |
140 | curl_delete "${identity_link}/name/test_plugin_rest_identity" "HTTP/1.1 204" | 139 | curl_delete "${identity_link}/name/test_plugin_rest_identity" "HTTP/1.1 204" |