-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker_container_test.http
47 lines (39 loc) · 1.62 KB
/
docker_container_test.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
### empty get
GET http://localhost:8080/queue/myqueue
> {%
client.test("Request executed successfully", function () {
const status = response.status;
client.assert(status === 200, "expected response status 200 but received '" + status + "'");
});
client.test("Response content-type is json", function() {
const type = response.contentType.mimeType;
client.assert(type === "application/json", "Expected 'application/json' but received '" + type + "'");
});
client.test("empty list is returned", function () {
const item = response.body.item;
client.assert(item === "no data", "response is not an empty list: '" + item + "'");
});
%}
### POST entry
POST http://localhost:8080/queue/myqueue/abdcef
> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "response status is not 200");
});
%}
### filled get
GET http://localhost:8080/queue/myqueue
> {%
client.test("Request executed successfully", function () {
const status = response.status;
client.assert(status === 200, "expected response status 200 but received '" + status + "'");
});
client.test("Response content-type is json", function() {
const type = response.contentType.mimeType;
client.assert(type === "application/json", "Expected 'application/json' but received '" + type + "'");
});
client.test("list with correct is returned", function () {
const item = response.body.item;
client.assert(item === 'abdcef', "response does not contain queue item but is: '" + item + "'");
});
%}