with directory requests
This commit is contained in:
53
requests/Create Service.yml
Normal file
53
requests/Create Service.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
info:
|
||||
name: Create Service
|
||||
type: http
|
||||
seq: 1
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: "{{baseUrl}}/api/v1/services"
|
||||
headers:
|
||||
- name: Content-Type
|
||||
value: application/json
|
||||
- name: requestID
|
||||
value: test-req-1
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"type": "SYSTEM",
|
||||
"code": "SERVICE_1",
|
||||
"name": "Test Service"
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: after-response
|
||||
code: "test('Status code is 200', function () {\r
|
||||
|
||||
\ expect(res.getStatus()).to.equal(200);\r
|
||||
|
||||
});\r
|
||||
|
||||
\r
|
||||
|
||||
let json = res.getBody();\r
|
||||
|
||||
\r
|
||||
|
||||
test('Status is SUCCESS', function () {\r
|
||||
|
||||
\ expect(json.status).to.eql('SUCCESS');\r
|
||||
|
||||
});\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setEnvVar('serviceId', json.data.id);"
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
Reference in New Issue
Block a user