(options)
| 168 | } |
| 169 | |
| 170 | function createAPIGatewayEvent(options) { |
| 171 | var options = setDefaults(options, "api-gateway"); |
| 172 | |
| 173 | return { |
| 174 | "resource": "/assets", |
| 175 | "path": options.path, |
| 176 | "httpMethod": options.method, |
| 177 | "headers": options.headers, |
| 178 | "queryStringParameters": options.queryStringParameters, |
| 179 | "pathParameters": options.pathParameters, |
| 180 | "stageVariables": options.stageVariables, |
| 181 | "requestContext": { |
| 182 | "accountId": "1234", |
| 183 | "resourceId": "snmm5d", |
| 184 | "stage": "test-invoke-stage", |
| 185 | "requestId": "test-invoke-request", |
| 186 | "identity": { |
| 187 | "cognitoIdentityPoolId": null, |
| 188 | "accountId": "1234", |
| 189 | "cognitoIdentityId": null, |
| 190 | "caller": "1234", |
| 191 | "apiKey": "test-invoke-api-key", |
| 192 | "sourceIp": "test-invoke-source-ip", |
| 193 | "accessKey": "1234", |
| 194 | "cognitoAuthenticationType": null, |
| 195 | "cognitoAuthenticationProvider": null, |
| 196 | "userArn": "arn:aws:iam::1234:user/test_user", |
| 197 | "userAgent": "Apache-HttpClient/4.5.x (Java/1.8.0)", |
| 198 | "user": "1234" |
| 199 | }, |
| 200 | "resourcePath": options.path, |
| 201 | "httpMethod": options.method, |
| 202 | "apiId": "1234" |
| 203 | }, |
| 204 | "body": options.body, |
| 205 | "isBase64Encoded": false |
| 206 | } |
| 207 | }; |
nothing calls this directly
no test coverage detected