-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathhttp_multipart.yml.runbook.golden
39 lines (39 loc) · 1.04 KB
/
http_multipart.yml.runbook.golden
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- -testdata-book-http_multipart.yml --
desc: Captured of http_multipart.yml run
labels:
- http
- openapi3
runners:
req:
endpoint: ${TEST_HTTP_ENDPOINT:-https:example.com}
openapi3: ../openapi3.yml
steps:
- req:
/upload:
post:
body:
multipart/form-data:
upload0: dummy.png
upload1: dummy.jpg
username: bob
test: |
current.res.status == 201
&& current.res.headers["Content-Length"][0] == "15"
&& current.res.headers["Content-Type"][0] == "text/html; charset=utf-8"
&& "Date" in current.res.headers
&& current.res.rawBody == "<h1>Posted</h1>"
- req:
/upload:
post:
body:
multipart/form-data:
file:
- dummy.png
- dummy.jpg
username: charlie
test: |
current.res.status == 201
&& current.res.headers["Content-Length"][0] == "15"
&& current.res.headers["Content-Type"][0] == "text/html; charset=utf-8"
&& "Date" in current.res.headers
&& current.res.rawBody == "<h1>Posted</h1>"