Go rest api tester
April 15, 2021 ยท View on GitHub
Go rest api tester
Simple HTTP rest api responder, responding whatever you like according to rules. Useful for integration tests.
Used in https://github.com/tektoncd/catalog task testing!
See some documentation here: https://github.com/tektoncd/catalog/blob/main/CONTRIBUTING.md#end-to-end-testing-for-external-services
RULES
- will answer on a
GETon URL/repo/foo/bar/issues/1/commentsand reply with a200{"status": 200}withcontent-type: text/json
---
headers:
method: GET
path: /repos/{repo:[^/]+/[^/]+}/issues/{issue:[0-9]+}/comments
response:
status: 200
# file: post-comment.response.json
output: '{"status": 200}'
content-type: text/json