feat: support alter response in teardown hooks

This commit is contained in:
debugtalk
2020-06-07 19:04:06 +08:00
parent 0b53f832f1
commit 45d1f3ed65
18 changed files with 54 additions and 32 deletions

View File

@@ -31,7 +31,7 @@ teststeps:
teardown_hooks:
- ${alter_response($response)}
validate:
- eq: ["status_code", 200]
# TODO: implement hooks
# - eq: [body.headers."Content-Type", "html/text"]
- eq: [body.headers.Host, "httpbin.org"]
- eq: ["status_code", 500]
- eq: [headers."Content-Type", "html/text"]
- eq: [body.headers."Content-Type", "application/json"]
- eq: [body.headers.Host, "127.0.0.1:8888"]