generated from byu-oit/hw-fargate-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhw-lambda-api.postman_collection.json
94 lines (94 loc) · 2.08 KB
/
hw-lambda-api.postman_collection.json
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"info": {
"_postman_id": "868867bc-aac9-428b-9743-164cf7acfecf",
"name": "hw-lambda-api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Healthcheck",
"event": [
{
"listen": "test",
"script": {
"id": "8d424273-7cac-44a1-9d4e-bcb6622ad121",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"pm.test(\"Body is correct\", function () {",
" pm.response.to.have.body(\"healthy\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{context}}/health",
"host": [
"{{context}}"
],
"path": [
"health"
]
}
},
"response": []
},
{
"name": "Root",
"event": [
{
"listen": "test",
"script": {
"id": "a4cd1c53-55cf-48ab-8acd-113e6e8c5d87",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"pm.test(\"JSON fields exist\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData).to.have.all.keys('secret','table','numItemsInDynamo','bucket','numObjectsInS3');",
"});",
"pm.test(\"Table name is correct\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.table).to.eql(\"hw-lambda-api-dev\");",
"});",
"pm.test(\"Bucket name is correct\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.bucket).to.eql(\"hw-lambda-api-dev\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{context}}/",
"host": [
"{{context}}"
],
"path": [
""
]
}
},
"response": []
}
]
}