feat(cw2): /api/v1/droneDetails impl

This commit is contained in:
js0ny 2025-11-18 19:06:30 +00:00
parent 3c96f9d5af
commit 44d510ddd4
7 changed files with 141 additions and 14 deletions

View file

@ -0,0 +1,29 @@
meta {
name: drone 1 details
type: http
seq: 1
}
get {
url: {{API_BASE}}/droneDetails/1
body: none
auth: inherit
}
assert {
res.body.id: eq "1"
res.body.capability.capacity: eq 4.0
res.body.capability.heating: eq true
}
tests {
test("Status code is 200", function() {
expect(res.status).to.equal(200);
});
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,29 @@
meta {
name: drone 10 details
type: http
seq: 2
}
get {
url: {{API_BASE}}/droneDetails/10
body: none
auth: inherit
}
assert {
res.body.id: eq "10"
res.body.capability.capacity: eq 12.0
res.body.capability.heating: eq false
}
tests {
test("Status code is 200", function() {
expect(res.status).to.equal(200);
});
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,23 @@
meta {
name: drone 11 details
type: http
seq: 3
}
get {
url: {{API_BASE}}/droneDetails/11
body: none
auth: inherit
}
tests {
test("Status code is 404", function() {
expect(res.status).to.equal(404);
});
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,23 @@
meta {
name: drone NaN details
type: http
seq: 4
}
get {
url: {{API_BASE}}/droneDetails/droneNaN
body: none
auth: inherit
}
tests {
test("Status code is 404", function() {
expect(res.status).to.equal(404);
});
}
settings {
encodeUrl: true
timeout: 0
}

View file

@ -0,0 +1,8 @@
meta {
name: [GET] droneDetails
seq: 2
}
auth {
mode: inherit
}