feat(cw2): /api/v1/dronesWithCooling impl
This commit is contained in:
parent
2b9b668a2f
commit
3c96f9d5af
10 changed files with 206 additions and 27 deletions
|
|
@ -0,0 +1,31 @@
|
|||
meta {
|
||||
name: dronesWithCooling -> false
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{API_BASE}}/dronesWithCooling/false
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
test("Status code is 200", function() {
|
||||
expect(res.status).to.equal(200);
|
||||
});
|
||||
|
||||
test("Response body is a JSON array", function() {
|
||||
expect(res.getBody()).to.be.an('array');
|
||||
});
|
||||
|
||||
test("Array is not empty and contains numbers", function() {
|
||||
const data = res.getBody();
|
||||
expect(data[0]).to.be.a('number'); // data should be in number
|
||||
});
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
meta {
|
||||
name: dronesWithCooling -> illegal
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{API_BASE}}/dronesWithCooling/illegal
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
test("Status code is 400", function() {
|
||||
expect(res.status).to.equal(400);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
meta {
|
||||
name: dronesWithCooling -> true
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{API_BASE}}/dronesWithCooling/true
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
tests {
|
||||
test("Status code is 200", function() {
|
||||
expect(res.status).to.equal(200);
|
||||
});
|
||||
|
||||
test("Response body is a JSON array", function() {
|
||||
expect(res.getBody()).to.be.an('array');
|
||||
});
|
||||
|
||||
test("Array is not empty and contains numbers", function() {
|
||||
const data = res.getBody();
|
||||
expect(data[0]).to.be.a('number'); // data should be in number
|
||||
});
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
8
ilp-cw-api/[GET] dronesWithCooling/folder.bru
Normal file
8
ilp-cw-api/[GET] dronesWithCooling/folder.bru
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
meta {
|
||||
name: [GET] dronesWithCooling
|
||||
seq: 1
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
9
ilp-cw-api/bruno.json
Normal file
9
ilp-cw-api/bruno.json
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"version": "1",
|
||||
"name": "ILP CW API Collection",
|
||||
"type": "collection",
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
".git"
|
||||
]
|
||||
}
|
||||
4
ilp-cw-api/collection.bru
Normal file
4
ilp-cw-api/collection.bru
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
vars:pre-request {
|
||||
BASE_URL: http://localhost:8080
|
||||
API_BASE: {{BASE_URL}}/api/v1
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue