summaryrefslogtreecommitdiff
path: root/apifw.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'apifw.yarn')
-rw-r--r--apifw.yarn13
1 files changed, 12 insertions, 1 deletions
diff --git a/apifw.yarn b/apifw.yarn
index a914ab9..064784b 100644
--- a/apifw.yarn
+++ b/apifw.yarn
@@ -38,7 +38,12 @@ It's a silly name. Please suggest something better.
WHEN client gets an authorization token with scope "uapi_upload_put"
AND client uploads a fake jpg
THEN HTTP status code is 200 OK
- AND HTTP body is "thank you for fake jpg"
+ AND HTTP body is "thank you for your data"
+
+ WHEN client gets an authorization token with scope "uapi_download_get"
+ AND client requests GET /download using token
+ THEN HTTP status code is 200 OK
+ AND HTTP body is "fake jpg"
FINALLY stop apitest
@@ -87,6 +92,12 @@ It's a silly name. Please suggest something better.
curl -sv -H "Authorization: Bearer $token" \
"http://127.0.0.1:$port/version" > "$DATADIR/out" 2> "$DATADIR/err"
+ IMPLEMENTS WHEN client requests GET /download using token
+ token="$(cat "$DATADIR/token")"
+ port="$(cat "$DATADIR/port")"
+ curl -sv -H "Authorization: Bearer $token" \
+ "http://127.0.0.1:$port/download" > "$DATADIR/out" 2> "$DATADIR/err"
+
IMPLEMENTS WHEN client uploads a fake jpg
token="$(cat "$DATADIR/token")"
port="$(cat "$DATADIR/port")"