-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsum_rate_limit.spec.json
More file actions
31 lines (31 loc) · 1.06 KB
/
sum_rate_limit.spec.json
File metadata and controls
31 lines (31 loc) · 1.06 KB
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
{
"envVars": {
"RATE_LIMIT": "0"
},
"handler": "sum",
"timestamp": "2020-09-04T13:09:51.410Z",
"success": true,
"response": {
"to.deep.equal()": "{\"statusCode\":429,\"body\":\"{\\\"message\\\":\\\"Rate limit exceeded.\\\"}\",\"headers\":{\"X-Rate-Limit-Reset\":9}}"
},
"logs([length])": {
"to.deep.equal()": 2
},
"logs([0])": {
"to.deep.equal()": "WARNING: 429 GET sum\n{\"event\":{\"queryStringParameters\":{\"input\":\"[1, 2, 3, 4, 5]\"},\"httpMethod\":\"GET\",\"requestContext\":{\"identity\":{\"sourceIp\":\"123.456.789.123\"}},\"path\":\"/sum\",\"headers\":{}},\"response\":{\"statusCode\":429,\"body\":{\"message\":\"Rate limit exceeded.\"},\"headers\":{\"X-Rate-Limit-Reset\":9}}}"
},
"logs([1])": {
"to.startsWith()": "JSON: {\"signature\":\"429 GET sum\",\"success\":false,\"level\":\"warn\",\"timings\":{\"duration\":"
},
"event": {
"queryStringParameters": {
"input": "[1, 2, 3, 4, 5]"
},
"httpMethod": "GET",
"requestContext": {
"identity": {
"sourceIp": "123.456.789.123"
}
}
}
}