diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-03-24 15:31:13 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-03-24 15:31:13 +0200 |
commit | 90ad6a91539add49e19b1fd337a4c085d9bc324d (patch) | |
tree | 68a5189fc1a526d97b8beb3cfc564c5075865d49 | |
parent | de78d0097e0feb858391010d3e8be784104ad28e (diff) | |
download | apifw-90ad6a91539add49e19b1fd337a4c085d9bc324d.tar.gz |
Add: scenario steps to test downloading
-rw-r--r-- | apifw.yarn | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -40,6 +40,11 @@ It's a silly name. Please suggest something better. THEN HTTP status code is 200 OK AND HTTP body is "thank you for fake jpg" + 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")" |