Files
sf-nfc-server/docs/nfc-server/Health check.yml

51 lines
910 B
YAML

info:
name: Health check
type: http
seq: 1
http:
method: GET
url: "{{baseUrl}}/health"
auth: inherit
runtime:
scripts:
- type: tests
code: |-
test("Should return 200", () => {
const body = res.getBody()
expect(res.getStatus()).to.equal(200)
})
test("Body should be ok:true", () => {
const body = res.getBody()
expect(body).to.eql({
ok:true
})
})
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
examples:
- name: 200 Response
description: Server is healthy
request:
url: "{{baseUrl}}/health"
method: GET
response:
status: 200
statusText: OK
headers:
- name: Content-Type
value: application/json
body:
type: json
data: |-
{
"ok": false
}