-
-
Save sime/ce2ca622226eba81ed95b5611e987d81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Serverless: Load command run | |
Serverless: Load command config | |
Serverless: Load command config:credentials | |
Serverless: Load command create | |
Serverless: Load command install | |
Serverless: Load command package | |
Serverless: Load command deploy | |
Serverless: Load command deploy:function | |
Serverless: Load command deploy:list | |
Serverless: Load command deploy:list:functions | |
Serverless: Load command invoke | |
Serverless: Load command invoke:local | |
Serverless: Load command info | |
Serverless: Load command logs | |
Serverless: Load command login | |
Serverless: Load command logout | |
Serverless: Load command metrics | |
Serverless: Load command print | |
Serverless: Load command remove | |
Serverless: Load command rollback | |
Serverless: Load command rollback:function | |
Serverless: Load command slstats | |
Serverless: Load command plugin | |
Serverless: Load command plugin | |
Serverless: Load command plugin:install | |
Serverless: Load command plugin | |
Serverless: Load command plugin:uninstall | |
Serverless: Load command plugin | |
Serverless: Load command plugin:list | |
Serverless: Load command plugin | |
Serverless: Load command plugin:search | |
Serverless: Load command emit | |
Serverless: Load command config | |
Serverless: Load command config:credentials | |
Serverless: Load command rollback | |
Serverless: Load command rollback:function | |
Serverless: Load command webpack | |
Serverless: Load command webpack:invoke | |
Serverless: Load command webpack:watch | |
Serverless: Load command webpack:serve | |
Serverless: WARNING: Plugin ServerlessWebpack uses deprecated hook before:deploy:createDeploymentArtifacts, | |
use package:createDeploymentArtifacts hook instead | |
Serverless: WARNING: Plugin ServerlessWebpack uses deprecated hook after:deploy:createDeploymentArtifacts, | |
use package:createDeploymentArtifacts hook instead | |
Serverless: Load command offline | |
Serverless: Load command offline:start | |
Serverless Warning -------------------------------------- | |
A valid service attribute to satisfy the declaration 'self:custom.env.parameters.node_env' could not be found. | |
Serverless: Invoke offline:start | |
Serverless: WARNING: More than one matching handlers found for 'handler'. Using 'handler.js'. | |
Serverless: WARNING: More than one matching handlers found for 'handler'. Using 'handler.js'. | |
Serverless: WARNING: More than one matching handlers found for 'handler'. Using 'handler.js'. | |
Serverless: WARNING: More than one matching handlers found for 'handler'. Using 'handler.js'. | |
entries { handler: './handler.js' } | |
Serverless: Bundling with Webpack... | |
Time: 6310ms | |
Asset Size Chunks Chunk Names | |
handler.js 4.86 MB 0 [emitted] [big] handler | |
handler.js.map 6.41 MB 0 [emitted] handler | |
[22] ./node_modules/depd/index.js 10.6 kB {0} [built] | |
[26] ./node_modules/inversify/lib/inversify.js 1.93 kB {0} [built] | |
[29] ./app/Types.js 787 bytes {0} [built] | |
[60] ./node_modules/inversify-express-utils/lib/index.js 1.03 kB {0} [built] | |
[93] ./app/inversify.config.js 2.92 kB {0} [built] | |
[121] ./node_modules/body-parser/index.js 2.66 kB {0} [built] | |
[349] ./handler.js 1.01 kB {0} [built] | |
[350] ./node_modules/serverless-http/serverless-http.js 1.65 kB {0} [built] | |
[365] ./node_modules/body-parser/lib/types/json.js 4.87 kB {0} [built] | |
[398] ./node_modules/body-parser/lib/types/urlencoded.js 5.79 kB {0} [built] | |
[426] ./node_modules/inversify-express-utils/lib/decorators.js 4.89 kB {0} [built] | |
[975] ./node_modules/@rps/portal-authorizer/lib/main.js 282 bytes {0} [built] | |
[985] ./node_modules/@rps/jwt-verification/lib/main.js 389 bytes {0} [built] | |
[1047] ./src/controller/RestaurantController.js 1.26 kB {0} [built] | |
[1048] ./src/controller/OnboardingController.js 3.85 kB {0} [built] | |
+ 1105 hidden modules | |
WARNING in ./node_modules/express/lib/view.js | |
81:13-25 Critical dependency: the request of a dependency is an expression | |
@ ./node_modules/express/lib/view.js | |
@ ./node_modules/express/lib/application.js | |
@ ./node_modules/express/lib/express.js | |
@ ./node_modules/express/index.js | |
@ ./node_modules/inversify-express-utils/lib/server.js | |
@ ./node_modules/inversify-express-utils/lib/index.js | |
@ ./handler.js | |
Serverless: Watching with Webpack... | |
Serverless: Starting Offline: test/eu-west-1. | |
[offline] options: { host: 'localhost', | |
location: '.webpack/service', | |
port: 4000, | |
prefix: '/', | |
stage: 'test', | |
region: 'eu-west-1', | |
noTimeout: false, | |
noEnvironment: false, | |
resourceRoutes: false, | |
dontPrintOutput: false, | |
httpsProtocol: '', | |
skipCacheInvalidation: false, | |
noAuth: false, | |
corsAllowOrigin: [ '*' ], | |
corsAllowHeaders: [ 'accept', 'content-type', 'x-api-key' ], | |
corsAllowCredentials: true, | |
apiKey: 'd41d8cd98f00b204e9800998ecf8427e', | |
c: true, | |
environment: 'environments/test.yml', | |
exec: 'yarn test-system', | |
verbose: true, | |
corsConfig: | |
{ origin: [ '*' ], | |
headers: [ 'accept', 'content-type', 'x-api-key' ], | |
credentials: true } } | |
[offline] globalBabelOptions: undefined | |
[offline] funOptions { | |
"funName": "restaurant", | |
"handlerName": "handle", | |
"handlerPath": "/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler", | |
"funTimeout": 30000 | |
} | |
[offline] restaurant runtime nodejs6.10 | |
Serverless: Routes for restaurant: | |
Serverless: GET /v1/restaurants/{restaurantId} | |
[offline] funOptions { | |
"funName": "getOnboarding", | |
"handlerName": "handle", | |
"handlerPath": "/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler", | |
"funTimeout": 30000 | |
} | |
[offline] getOnboarding runtime nodejs6.10 | |
Serverless: Routes for getOnboarding: | |
Serverless: GET /v1/restaurants/{restaurantId}/onboarding | |
[offline] funOptions { | |
"funName": "postOnboarding", | |
"handlerName": "handle", | |
"handlerPath": "/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler", | |
"funTimeout": 30000 | |
} | |
[offline] postOnboarding runtime nodejs6.10 | |
Serverless: Routes for postOnboarding: | |
Serverless: POST /v1/restaurants/{restaurantId}/onboarding | |
[offline] funOptions { | |
"funName": "putOnboarding", | |
"handlerName": "handle", | |
"handlerPath": "/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler", | |
"funTimeout": 30000 | |
} | |
[offline] putOnboarding runtime nodejs6.10 | |
Serverless: Routes for putOnboarding: | |
Serverless: PUT /v1/restaurants/{restaurantId}/onboarding | |
Serverless: Offline listening on http://localhost:4000 | |
Serverless: Offline executing script [yarn test-system] | |
Serverless: GET /v1/restaurants/1/onboarding (λ: getOnboarding) | |
Serverless: The first request might take a few extra seconds | |
[offline] requestId: 9600387952051874 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: null | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MSwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkxMywiZXhwIjoxNTEwNzU3OTQ5LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.wFXsbgnyQoa1YcUIWBqq97nPCuqvxd1ICIjJj0pNY5mq6gv0-2CYsMUQ5OYgCvYcoXj7P2hmohIbj4y1ktwCzvM-EPDEZjPfeGdqT1z_gR50Zi-Vy1y4MGUCSRes9dZujE13Tl67HRao7mABVX-reOGk_D2_4Rl6d2Xsk8TVnFtoxZ_ax20aOVl36TW8b8jI1zo5YjJXiXmJFZ6DgBE17zepbV9WdLHcWgUkJqjQqRAHgsIW9Qlx4K4Ddfn14Y-JoMPMTawUkiCx0Q_rSCJHmRGETti3ikctad1_kkBRiS0ZVEEI53ZWSD3zMOWtk-9LhaCvqV-pZWUpSS3SvZfiVQ', | |
Host: 'localhost:4000', | |
Connection: 'close' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: null, | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [200] {"isBase64Encoded":false,"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"29","etag":"W/\"1d-CroS47FMUtL1I8bmOMOeKdH6/cs\""},"body":"{\"data\":{\"status\":\"STARTED\"}}"} | |
[offline] requestId: 9600387952051874 | |
Serverless: GET /v1/restaurants/20/onboarding (λ: getOnboarding) | |
[offline] requestId: 7606417747304142 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: null | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MjAsInBsYXRmb3JtcyI6W3sicmVzdGF1cmFudElkIjoiMTAwOTMxMTIzbiIsInBsYXRmb3JtSWQiOiJERUxJVkVSWV9IRVJPIn1dfV19LCJpYXQiOjE1MTA3NTc5MTQsImV4cCI6MTUxMDc1Nzk1MCwiaXNzIjoidGVzdHMiLCJzdWIiOiIxIn0.Wi9n_k8XTOFUMSKr-ezgKrcbYOq0qCdaGgKNd3sN3e3cc4G4nXsq1ybUVbjktYiLlNpxAB1kCg3fTcSuQu106_nFE2--IJDNr6elahJCQ_Zm1FcvKW1yhiMHCraiya4SCtgQoUJS6fo7ryYwOyvF7xMmdDH3JHVxYGYxiD9_Du3Sxpmy5lQ6pBc8wfILWtedbQAZi-LsKmQqq4MxdxjWDTV9icRcXBe8bVgPjIl9fmoSW44t8VfRAnaOQt3EZkIS5-iW6QE_2uXTcr_78aGWe1IcYMeRiLI0hTqBD9lZ0iaKVXqQOL5E5OOTZzmu-oDp-dcMkqWIZiWAYMzDSTcvoQ', | |
Host: 'localhost:4000', | |
Connection: 'close' }, | |
path: '/v1/restaurants/20/onboarding', | |
pathParameters: { restaurantId: '20' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: null, | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [404] {"isBase64Encoded":false,"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"9","etag":"W/\"9-0gXL1ngzMqISxa6S1zx3F4wtLyg\""},"body":"Not Found"} | |
[offline] requestId: 7606417747304142 | |
Serverless: GET /v1/restaurants/1/onboarding (λ: getOnboarding) | |
[offline] requestId: 25636257938660734 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: null | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6NTU1LCJwbGF0Zm9ybXMiOlt7InJlc3RhdXJhbnRJZCI6IjEwMDkzMTEyM24iLCJwbGF0Zm9ybUlkIjoiREVMSVZFUllfSEVSTyJ9XX0seyJpZCI6MjY3LCJwbGF0Zm9ybXMiOlt7InJlc3RhdXJhbnRJZCI6ImFiY2RlZjEyMzQ1IiwicGxhdGZvcm1JZCI6IlNPTUVUSElORyJ9XX1dfSwiaWF0IjoxNTEwNzU3OTE1LCJleHAiOjE1MTA3NTc5NTEsImlzcyI6InRlc3RzIiwic3ViIjoiMSJ9.abjLu3izMKRVjBK5mOGACaruBgV6fwbuKQ04kEUvdxbb3KigMp8tw1Sa36L5hdR_wRDbiB23UdnFvl4r8EddXtXFurhpowNtwK-4tLONct-89DIGze-jhb17_aRBDdIVtdqEu3u6b4sigmWbO8f-e_5VtaqJn2tczqDaE5VwH0d5EA1Q3K3S8LEPNydLoMiA-16lsBP6kDVAL60P_fu0cAA3T-rKfGPfFjrRcFM0p_D9BHWIGKG8n6LupY0ieIWpGAb5ztZyXl632XVghvz8MN37l8dXibqZO3TsVEZOymyJpqEPMQjaWgYrSy4mgHwD-qrLXEcJLJI-3LxclyhpJw', | |
Host: 'localhost:4000', | |
Connection: 'close' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: null, | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [403] {"isBase64Encoded":false,"statusCode":403,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/html; charset=utf-8","content-length":"58","etag":"W/\"3a-nIY/6bHcVVsBS8Fk7U9dDEbUFBg\""},"body":"{\"state\":\"ERROR\",\"code\":\"FORBIDDEN\",\"message\":\"Forbidden\"}"} | |
[offline] requestId: 25636257938660734 | |
Serverless: GET /v1/restaurants/1/onboarding (λ: getOnboarding) | |
[offline] requestId: 5432363628695547 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: null | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: { Host: 'localhost:4000', Connection: 'close' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: undefined }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: null, | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [401] {"isBase64Encoded":false,"statusCode":401,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/html; charset=utf-8","content-length":"128","etag":"W/\"80-u6pNafVGAPXguCMxsbCER5doXIA\""},"body":"{\"state\":\"ERROR\",\"code\":\"TOKEN_INVALID\",\"message\":\"Authorization failed, invalid authorization header (did you forget Bearer?)\"}"} | |
[offline] requestId: 5432363628695547 | |
Serverless: GET /v1/restaurants/1/onboarding (λ: getOnboarding) | |
[offline] requestId: 8928830935784791 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: null | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer some totally wrong token', | |
Host: 'localhost:4000', | |
Connection: 'close' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: undefined }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'GET', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: null, | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [401] {"isBase64Encoded":false,"statusCode":401,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/html; charset=utf-8","content-length":"108","etag":"W/\"6c-AX6WhN/5z+Z0ogyoaWFczFHY4iw\""},"body":"{\"state\":\"ERROR\",\"code\":\"TOKEN_INVALID\",\"message\":\"Authorization failed, provided token cannot be verified\"}"} | |
[offline] requestId: 8928830935784791 | |
Serverless: POST /v1/restaurants/2/onboarding (λ: postOnboarding) | |
Serverless: The first request might take a few extra seconds | |
[offline] error in converting request.payload to JSON: SyntaxError: Unexpected end of JSON input | |
at Object.parse (native) | |
at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:481:40) | |
at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36) | |
at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23) | |
at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5) | |
at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20) | |
at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20) | |
at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26) | |
at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16) | |
at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20) | |
at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20) | |
at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16) | |
at g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at emit (events.js:185:7) | |
at finishMaybe (_stream_writable.js:515:14) | |
at endWritable (_stream_writable.js:525:3) | |
at Writable.end (_stream_writable.js:490:5) | |
at IncomingMessage.onend (_stream_readable.js:511:10) | |
at IncomingMessage.g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at IncomingMessage.emit (events.js:185:7) | |
at endReadableNT (_stream_readable.js:974:12) | |
at _combinedTickCallback (internal/process/next_tick.js:74:11) | |
at process._tickDomainCallback (internal/process/next_tick.js:122:9) | |
[offline] requestId: 9970374179728654 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
Serverless: Error while loading postOnboarding | |
[ 'Error: Serverless-offline: handler for \'postOnboarding\' is not a function', | |
'at Object.createHandler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/functionHelper.js:38:13)', | |
'at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:499:40)', | |
'at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36)', | |
'at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23)', | |
'at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5)', | |
'at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22)', | |
'at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16)', | |
'at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13)', | |
'at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25)', | |
'at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16)', | |
'at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16)', | |
'at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13)', | |
'at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25)', | |
'at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20)', | |
'at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20)', | |
'at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26)', | |
'at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16)', | |
'at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20)', | |
'at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20)', | |
'at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16)', | |
'at g (events.js:291:16)', | |
'at emitNone (events.js:91:20)', | |
'at emit (events.js:185:7)', | |
'at finishMaybe (_stream_writable.js:515:14)', | |
'at endWritable (_stream_writable.js:525:3)', | |
'at Writable.end (_stream_writable.js:490:5)', | |
'at IncomingMessage.onend (_stream_readable.js:511:10)', | |
'at IncomingMessage.g (events.js:291:16)', | |
'at emitNone (events.js:91:20)', | |
'at IncomingMessage.emit (events.js:185:7)', | |
'at endReadableNT (_stream_readable.js:974:12)', | |
'at _combinedTickCallback (internal/process/next_tick.js:74:11)' ] | |
Serverless: Replying error in handler | |
Hash: 591c22549112cebd241b | |
Version: webpack 3.8.1 | |
Time: 8152ms | |
Asset Size Chunks Chunk Names | |
handler.js 4.86 MB 0 [emitted] [big] handler | |
handler.js.map 6.41 MB 0 [emitted] handler | |
[22] ./node_modules/depd/index.js 10.6 kB {0} [built] | |
[26] ./node_modules/inversify/lib/inversify.js 1.93 kB {0} [built] | |
[29] ./app/Types.js 787 bytes {0} [built] | |
[60] ./node_modules/inversify-express-utils/lib/index.js 1.03 kB {0} [built] | |
[93] ./app/inversify.config.js 2.92 kB {0} [built] | |
[121] ./node_modules/body-parser/index.js 2.66 kB {0} [built] | |
[349] ./handler.js 1.01 kB {0} [built] | |
[350] ./node_modules/serverless-http/serverless-http.js 1.65 kB {0} [built] | |
[365] ./node_modules/body-parser/lib/types/json.js 4.87 kB {0} [built] | |
[398] ./node_modules/body-parser/lib/types/urlencoded.js 5.79 kB {0} [built] | |
[426] ./node_modules/inversify-express-utils/lib/decorators.js 4.89 kB {0} [built] | |
[975] ./node_modules/@rps/portal-authorizer/lib/main.js 282 bytes {0} [built] | |
[985] ./node_modules/@rps/jwt-verification/lib/main.js 389 bytes {0} [built] | |
[1047] ./src/controller/RestaurantController.js 1.26 kB {0} [built] | |
[1048] ./src/controller/OnboardingController.js 3.85 kB {0} [built] | |
+ 1105 hidden modules | |
WARNING in ./node_modules/express/lib/view.js | |
81:13-25 Critical dependency: the request of a dependency is an expression | |
@ ./node_modules/express/lib/view.js | |
@ ./node_modules/express/lib/application.js | |
@ ./node_modules/express/lib/express.js | |
@ ./node_modules/express/index.js | |
@ ./node_modules/inversify-express-utils/lib/server.js | |
@ ./node_modules/inversify-express-utils/lib/index.js | |
@ ./handler.js | |
Serverless: POST /v1/restaurants/2/onboarding (λ: postOnboarding) | |
[offline] error in converting request.payload to JSON: SyntaxError: Unexpected end of JSON input | |
at Object.parse (native) | |
at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:481:40) | |
at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36) | |
at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23) | |
at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5) | |
at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20) | |
at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20) | |
at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26) | |
at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16) | |
at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20) | |
at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20) | |
at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16) | |
at g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at emit (events.js:185:7) | |
at finishMaybe (_stream_writable.js:515:14) | |
at endWritable (_stream_writable.js:525:3) | |
at Writable.end (_stream_writable.js:490:5) | |
at IncomingMessage.onend (_stream_readable.js:511:10) | |
at IncomingMessage.g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at IncomingMessage.emit (events.js:185:7) | |
at endReadableNT (_stream_readable.js:974:12) | |
at _combinedTickCallback (internal/process/next_tick.js:74:11) | |
at process._tickDomainCallback (internal/process/next_tick.js:122:9) | |
[offline] requestId: 4752687172459833 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MSwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkxOSwiZXhwIjoxNTEwNzU3OTU1LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.UxqsNGPory8XN6v1AH20h1zPVMb6dV6hbKzRAXZa-m4ul4q89umtAHqEb6GiEcIGQkud-ONE1telRsjMZN_OeeWZbXmvB-viWJqp3TANTMTGCUVMvpPVXPVqsgd51fd-Y0HCKQkSPuhLCaDQlK4qh0SW2KU5G1n5eSIfzkr2bT3etYLihsPsp0k0LzgvTdTgdiwF-06SypHFr02FyZyHlR4Xtre2rGQzIaqNr8dAMShcDE4uL2Dx9wzMK2zkErGpyfomPl2AaSStdAsgBLFyjG2UwjO7KjRLacv-13yOt0A3ezLbJtcliDTPLxySHWsnvv12p-taOccAU0yCdkDkew', | |
'Content-type': 'application/json', | |
Host: 'localhost:4000', | |
Connection: 'close', | |
'Content-Length': '0' }, | |
path: '/v1/restaurants/2/onboarding', | |
pathParameters: { restaurantId: '2' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'POST' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'POST', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: '', | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [403] {"isBase64Encoded":false,"statusCode":403,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/html; charset=utf-8","content-length":"58","etag":"W/\"3a-nIY/6bHcVVsBS8Fk7U9dDEbUFBg\""},"body":"{\"state\":\"ERROR\",\"code\":\"FORBIDDEN\",\"message\":\"Forbidden\"}"} | |
[offline] requestId: 4752687172459833 | |
Serverless: PUT /v1/restaurants/2/onboarding (λ: putOnboarding) | |
Serverless: The first request might take a few extra seconds | |
[offline] requestId: 6450776695763971 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: { address: {}, phoneNumber: {} } | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MiwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkxOSwiZXhwIjoxNTEwNzU3OTU1LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.ceEOpK7hXgT7FtWm2pSfj9NvbtDFmWjuU_R4zdB5d1Evf61VjbXX2SusJeKYohqDCkuRZxbXj6A5bTQF61I6zCshQwscwdHNMzqs7IARYgd3Em1Le_iEDEh2KJYyEbrTWckmaTRX3Tbai2FH3rpU6aE3hvGT2Jz2fk4-Z8gTzDfyrbl4D8BqAO_J8bVTe16CtEqhV50Y9Bibtp5Dvd8TwiViHMKlxc21kGdRRAayAlifi_5IeR7zRKZorYF-xPq5aBlRdb-NaJbDjf2kx1e7bAvmvGGaulmoZpi3YUnAVLN0I_FnTiuJkOfS5JDm4_6lyLSsT4TFEFTMFWemkcFPxw', | |
'Content-type': 'application/json', | |
Host: 'localhost:4000', | |
Connection: 'close', | |
'Content-Length': 31, | |
'Content-Type': 'application/json' }, | |
path: '/v1/restaurants/2/onboarding', | |
pathParameters: { restaurantId: '2' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: '{"address":{},"phoneNumber":{}}', | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [404] {"isBase64Encoded":false,"statusCode":404,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/plain; charset=utf-8","content-length":"9","etag":"W/\"9-0gXL1ngzMqISxa6S1zx3F4wtLyg\""},"body":"Not Found"} | |
[offline] requestId: 6450776695763971 | |
Serverless: PUT /v1/restaurants/1/onboarding (λ: putOnboarding) | |
[offline] requestId: 5452678358246013 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: { address: {}, phoneNumber: {} } | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MSwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkyMCwiZXhwIjoxNTEwNzU3OTU2LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.8yMTfPxuNCWV54bQSfn9z28oRXCztU9WXxbhp63y9XjIyB4N2GHUjoAL0xv9NAOHX-5PhSKD2Crj1y7PDLDqsbxxfkJ876iq71NoTnRSpFnYG-l52oa9ftP2byUQm66AuAxc3Sf1rFYdWD3ATgJgbcXRiI5fdUr-SuwTUfsbdikHzpuhqwDIiFzD5EyijEeZZfEp_DlhYXHuvdU3p7eAIGWWF_aqa_c9bl3_iWtYwfamBYfu-flReJiAmsn-vOgEHBR9L5ZOKXYWhXFlenOQqnrSH9qQjcsxsntJOXP82VZCaXRSXvM4LKDNEtQ3ePRT6n_-wZpdbaRGw2wh1n79Lg', | |
'Content-type': 'application/json', | |
Host: 'localhost:4000', | |
Connection: 'close', | |
'Content-Length': 31, | |
'Content-Type': 'application/json' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: '{"address":{},"phoneNumber":{}}', | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
(node:6774) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Can't set headers after they are sent. | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [400] {"isBase64Encoded":false,"statusCode":400,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"1007","etag":"W/\"3ef-mRzo7ZsoDkK+DFteO85Dw69oDxE\""},"body":"{\"state\":\"ERROR\",\"code\":\"VALIDATION_ERROR\",\"message\":\"Error\",\"errors\":[{\"field\":\"address.city\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.city cannot be empty\"},{\"field\":\"address.country\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.country cannot be empty\"},{\"field\":\"address.houseNumberOrName\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.houseNumberOrName cannot be empty\"},{\"field\":\"address.zip\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.zip cannot be empty\"},{\"field\":\"address.street\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.street cannot be empty\"},{\"field\":\"email\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"email cannot be empty\"},{\"field\":\"phoneNumber.countryCode\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"phoneNumber.countryCode cannot be empty\"},{\"field\":\"phoneNumber.number\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"phoneNumber.number cannot be empty\"},{\"field\":\"phoneNumber.type\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"phoneNumber.type cannot be empty\"}]}"} | |
[offline] requestId: 5452678358246013 | |
Serverless: PUT /v1/restaurants/1/onboarding (λ: putOnboarding) | |
[offline] requestId: 7802517143842926 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: { email: 'test@deliveryhero.com', | |
address: | |
{ city: 'Berlin', | |
country: 'de', | |
houseNumberOrName: '1', | |
zip: '12459', | |
street: 'Friedrichstr' }, | |
phoneNumber: { countryCode: '49', number: '1234567890', type: 'mobile' } } | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MSwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkyMSwiZXhwIjoxNTEwNzU3OTU3LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.Ya4WLrZOXoVraLy9h4SoU3BXQ_F5ztIFqCFAN1gvWLzS3EIsXSPCQegFrmcstxgIO0IRysU5hfj4I_9l3NQiDfYwZIgin3gF6JFL_sDG-K-tdgST_GAZjm3ZKKdwhdyq-zye-qb7tJpxRruoZPQuQUbq2V0LEHkoBbq9bQqnNwRUeJvy4ql87y0QSkFmliXO4NniFTZ7TfHcRRst5qPGOKS41nI-rFXoVKuwJE9jhabReH0Z1Ib5N5RWZUuF8rDpNwPIt_5792zg_qqQ2UDgHzoT3QIFIGLh1J2-SUklCQQ3qik_4dQkcp6PgguAwFLy39ogWUZ_WQZhDE5_rDh8BQ', | |
'Content-type': 'application/json', | |
Host: 'localhost:4000', | |
Connection: 'close', | |
'Content-Length': 211, | |
'Content-Type': 'application/json' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: '{"email":"test@deliveryhero.com","address":{"city":"Berlin","country":"de","houseNumberOrName":"1","zip":"12459","street":"Friedrichstr"},"phoneNumber":{"countryCode":"49","number":"1234567890","type":"mobile"}}', | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [200] {"isBase64Encoded":false,"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"28","etag":"W/\"1c-wPBiDOo2+5pzDxuZxSPdsT3iq8o\""},"body":"{\"data\":{\"status\":\"QUEUED\"}}"} | |
[offline] requestId: 7802517143842926 | |
Serverless: PUT /v1/restaurants/1/onboarding (λ: putOnboarding) | |
[offline] error in converting request.payload to JSON: SyntaxError: Unexpected end of JSON input | |
at Object.parse (native) | |
at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:481:40) | |
at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36) | |
at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23) | |
at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5) | |
at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20) | |
at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20) | |
at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26) | |
at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16) | |
at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20) | |
at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20) | |
at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16) | |
at g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at emit (events.js:185:7) | |
at finishMaybe (_stream_writable.js:515:14) | |
at endWritable (_stream_writable.js:525:3) | |
at Writable.end (_stream_writable.js:490:5) | |
at IncomingMessage.onend (_stream_readable.js:511:10) | |
at IncomingMessage.g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at IncomingMessage.emit (events.js:185:7) | |
at endReadableNT (_stream_readable.js:974:12) | |
at _combinedTickCallback (internal/process/next_tick.js:74:11) | |
at process._tickDomainCallback (internal/process/next_tick.js:122:9) | |
[offline] requestId: 7243659630132515 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MSwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkyMSwiZXhwIjoxNTEwNzU3OTU3LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.Ya4WLrZOXoVraLy9h4SoU3BXQ_F5ztIFqCFAN1gvWLzS3EIsXSPCQegFrmcstxgIO0IRysU5hfj4I_9l3NQiDfYwZIgin3gF6JFL_sDG-K-tdgST_GAZjm3ZKKdwhdyq-zye-qb7tJpxRruoZPQuQUbq2V0LEHkoBbq9bQqnNwRUeJvy4ql87y0QSkFmliXO4NniFTZ7TfHcRRst5qPGOKS41nI-rFXoVKuwJE9jhabReH0Z1Ib5N5RWZUuF8rDpNwPIt_5792zg_qqQ2UDgHzoT3QIFIGLh1J2-SUklCQQ3qik_4dQkcp6PgguAwFLy39ogWUZ_WQZhDE5_rDh8BQ', | |
'Content-type': 'application/json', | |
Host: 'localhost:4000', | |
Connection: 'close', | |
'Content-Length': '0' }, | |
path: '/v1/restaurants/1/onboarding', | |
pathParameters: { restaurantId: '1' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: '', | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
(node:6774) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Can't set headers after they are sent. | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [400] {"isBase64Encoded":false,"statusCode":400,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"1007","etag":"W/\"3ef-mRzo7ZsoDkK+DFteO85Dw69oDxE\""},"body":"{\"state\":\"ERROR\",\"code\":\"VALIDATION_ERROR\",\"message\":\"Error\",\"errors\":[{\"field\":\"address.city\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.city cannot be empty\"},{\"field\":\"address.country\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.country cannot be empty\"},{\"field\":\"address.houseNumberOrName\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.houseNumberOrName cannot be empty\"},{\"field\":\"address.zip\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.zip cannot be empty\"},{\"field\":\"address.street\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"address.street cannot be empty\"},{\"field\":\"email\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"email cannot be empty\"},{\"field\":\"phoneNumber.countryCode\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"phoneNumber.countryCode cannot be empty\"},{\"field\":\"phoneNumber.number\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"phoneNumber.number cannot be empty\"},{\"field\":\"phoneNumber.type\",\"code\":\"FIELD_CANNOT_BE_EMPTY\",\"message\":\"phoneNumber.type cannot be empty\"}]}"} | |
[offline] requestId: 7243659630132515 | |
Serverless: PUT /v1/restaurants/2/onboarding (λ: putOnboarding) | |
[offline] error in converting request.payload to JSON: SyntaxError: Unexpected end of JSON input | |
at Object.parse (native) | |
at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:481:40) | |
at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36) | |
at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23) | |
at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5) | |
at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16) | |
at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16) | |
at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13) | |
at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25) | |
at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20) | |
at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20) | |
at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26) | |
at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16) | |
at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20) | |
at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20) | |
at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16) | |
at g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at emit (events.js:185:7) | |
at finishMaybe (_stream_writable.js:515:14) | |
at endWritable (_stream_writable.js:525:3) | |
at Writable.end (_stream_writable.js:490:5) | |
at IncomingMessage.onend (_stream_readable.js:511:10) | |
at IncomingMessage.g (events.js:291:16) | |
at emitNone (events.js:91:20) | |
at IncomingMessage.emit (events.js:185:7) | |
at endReadableNT (_stream_readable.js:974:12) | |
at _combinedTickCallback (internal/process/next_tick.js:74:11) | |
at process._tickDomainCallback (internal/process/next_tick.js:122:9) | |
[offline] requestId: 8407517817352461 | |
[offline] contentType: application/json | |
[offline] requestTemplate: | |
[offline] payload: | |
[offline] Invalidating cache... | |
[offline] Loading handler... (/home/travis/build/deliveryhero/rps-kyc/.webpack/service/handler) | |
[offline] event: { headers: | |
{ Authorization: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRoU2NoZW1hIjp7InJlc3RhdXJhbnRzIjpbeyJpZCI6MSwicGxhdGZvcm1zIjpbeyJyZXN0YXVyYW50SWQiOiIxMDA5MzExMjNuIiwicGxhdGZvcm1JZCI6IkRFTElWRVJZX0hFUk8ifV19XX0sImlhdCI6MTUxMDc1NzkyMywiZXhwIjoxNTEwNzU3OTU5LCJpc3MiOiJ0ZXN0cyIsInN1YiI6IjEifQ.Ba4dox_PPxw7RhQk7l-wkbi1GgCKzEAFq3iPNm-GQ-OB6VzMAI7D59gS8kMQg-BwfE8ERUcFD9x4qIUg7qscgzrIgzpU0-yNtVP8LtqED5xzfETGvaoH9uhrtwuBJZrLVbx18trrvaFNwANZxHg49f4cv75W8bKUxzQDH4zNjwwjkUJ_KtcIFh4oAEln7Z68TTiHWGrozw7QcyfNQ547bvio9_eyrZisDT3AAmjwqWPARMprt5h7_mqmfeAAPA7htcXm5NHCEL9SEHOVFTdZOU4VW_fLxMMIEzmSAdYFWG3Yof4c9vyGnMBCTrggtCEVmyGnQAhy0bUB7eBydpmhFg', | |
'Content-type': 'application/json', | |
Host: 'localhost:4000', | |
Connection: 'close', | |
'Content-Length': '0' }, | |
path: '/v1/restaurants/2/onboarding', | |
pathParameters: { restaurantId: '2' }, | |
requestContext: | |
{ accountId: 'offlineContext_accountId', | |
resourceId: 'offlineContext_resourceId', | |
apiId: 'offlineContext_apiId', | |
stage: 'test', | |
requestId: 'offlineContext_requestId_', | |
identity: | |
{ cognitoIdentityPoolId: 'offlineContext_cognitoIdentityPoolId', | |
accountId: 'offlineContext_accountId', | |
cognitoIdentityId: 'offlineContext_cognitoIdentityId', | |
caller: 'offlineContext_caller', | |
apiKey: 'offlineContext_apiKey', | |
sourceIp: '127.0.0.1', | |
cognitoAuthenticationType: 'offlineContext_cognitoAuthenticationType', | |
cognitoAuthenticationProvider: 'offlineContext_cognitoAuthenticationProvider', | |
userArn: 'offlineContext_userArn', | |
userAgent: '', | |
user: 'offlineContext_user' }, | |
authorizer: | |
{ principalId: 'offlineContext_authorizer_principalId', | |
claims: [Object] }, | |
resourcePath: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT' }, | |
resource: '/v1/restaurants/{restaurantId}/onboarding', | |
httpMethod: 'PUT', | |
queryStringParameters: null, | |
stageVariables: null, | |
body: '', | |
isOffline: true } | |
[offline] _____ CALLING HANDLER _____ | |
[offline] _____ HANDLER RESOLVED _____ | |
[offline] Using response 'default' | |
[offline] _____ RESPONSE PARAMETERS PROCCESSING _____ | |
[offline] Found 0 responseParameters for 'default' response | |
Serverless: [403] {"isBase64Encoded":false,"statusCode":403,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"text/html; charset=utf-8","content-length":"58","etag":"W/\"3a-nIY/6bHcVVsBS8Fk7U9dDEbUFBg\""},"body":"{\"state\":\"ERROR\",\"code\":\"FORBIDDEN\",\"message\":\"Forbidden\"}"} | |
[offline] requestId: 8407517817352461 | |
Serverless: exec stdout: [ | |
GetOnboardingTest | |
✓ should return restaurant data (999ms) | |
✓ should return 404 when onboarding not found (762ms) | |
✓ should return 403 when restaurant doesn't match auth schema ones (196ms) | |
✓ should return 401 when no token passed (211ms) | |
✓ should return 401 when token cannot be validated (212ms) | |
StartOnboardingTest | |
1) should start onboarding | |
✓ should retrun 403 when unauthorized (313ms) | |
StartOnboardingTest | |
✓ should return 404 when onboarding not found (420ms) | |
✓ should return validation errors (522ms) | |
✓ should update onboarding (810ms) | |
✓ should validate empty request (1057ms) | |
✓ should retrun 403 when unauthorized (146ms) | |
11 passing (11s) | |
1 failing | |
1) StartOnboardingTest | |
should start onboarding: | |
Uncaught Error: expected { errorMessage: 'Error while loading postOnboarding', | |
errorType: 'Error', | |
stackTrace: | |
[ 'Error: Serverless-offline: handler for \'postOnboarding\' is not a function', | |
'at Object.createHandler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/functionHelper.js:38:13)', | |
'at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:499:40)', | |
'at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36)', | |
'at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23)', | |
'at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5)', | |
'at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22)', | |
'at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16)', | |
'at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13)', | |
'at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25)', | |
'at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16)', | |
'at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16)', | |
'at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13)', | |
'at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25)', | |
'at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20)', | |
'at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20)', | |
'at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26)', | |
'at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16)', | |
'at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20)', | |
'at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20)', | |
'at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16)', | |
'at g (events.js:291:16)', | |
'at emitNone (events.js:91:20)', | |
'at emit (events.js:185:7)', | |
'at finishMaybe (_stream_writable.js:515:14)', | |
'at endWritable (_stream_writable.js:525:3)', | |
'at Writable.end (_stream_writable.js:490:5)', | |
'at IncomingMessage.onend (_stream_readable.js:511:10)', | |
'at IncomingMessage.g (events.js:291:16)', | |
'at emitNone (events.js:91:20)', | |
'at IncomingMessage.emit (events.js:185:7)', | |
'at endReadableNT (_stream_readable.js:974:12)', | |
'at _combinedTickCallback (internal/process/next_tick.js:74:11)' ], | |
offlineInfo: 'If you believe this is an issue with the plugin please submit it, thanks. https://github.com/dherault/serverless-offline/issues' } to sort of equal { data: { status: 'STARTED' } } | |
+ expected - actual | |
{ | |
- "errorMessage": "Error while loading postOnboarding" | |
- "errorType": "Error" | |
- "offlineInfo": "If you believe this is an issue with the plugin please submit it, thanks. https://github.com/dherault/serverless-offline/issues" | |
- "stackTrace": [ | |
- "Error: Serverless-offline: handler for 'postOnboarding' is not a function" | |
- "at Object.createHandler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/functionHelper.js:38:13)" | |
- "at handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/serverless-offline/src/index.js:499:40)" | |
- "at Object.internals.handler (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:96:36)" | |
- "at request._protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:30:23)" | |
- "at internals.Protect.run (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/protect.js:64:5)" | |
- "at exports.execute (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/handler.js:24:22)" | |
- "at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16)" | |
- "at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13)" | |
- "at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25)" | |
- "at internals.Auth.payload (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/auth.js:223:16)" | |
- "at each (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/request.js:384:16)" | |
- "at iterate (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:36:13)" | |
- "at done (/home/travis/build/deliveryhero/rps-kyc/node_modules/items/lib/index.js:28:25)" | |
- "at onParsed (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:402:20)" | |
- "at Subtext.parse (/home/travis/build/deliveryhero/rps-kyc/node_modules/hapi/lib/route.js:423:20)" | |
- "at next (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:45:26)" | |
- "at Wreck.read (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/lib/index.js:242:16)" | |
- "at finish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:374:20)" | |
- "at wrapped (/home/travis/build/deliveryhero/rps-kyc/node_modules/hoek/lib/index.js:875:20)" | |
- "at onReaderFinish (/home/travis/build/deliveryhero/rps-kyc/node_modules/subtext/node_modules/wreck/lib/index.js:449:16)" | |
- "at g (events.js:291:16)" | |
- "at emitNone (events.js:91:20)" | |
- "at emit (events.js:185:7)" | |
- "at finishMaybe (_stream_writable.js:515:14)" | |
- "at endWritable (_stream_writable.js:525:3)" | |
- "at Writable.end (_stream_writable.js:490:5)" | |
- "at IncomingMessage.onend (_stream_readable.js:511:10)" | |
- "at IncomingMessage.g (events.js:291:16)" | |
- "at emitNone (events.js:91:20)" | |
- "at IncomingMessage.emit (events.js:185:7)" | |
- "at endReadableNT (_stream_readable.js:974:12)" | |
- "at _combinedTickCallback (internal/process/next_tick.js:74:11)" | |
- ] | |
+ "data": { | |
+ "status": "STARTED" | |
+ } | |
} | |
at Assertion.assert (/home/travis/build/deliveryhero/rps-kyc/node_modules/expect.js/index.js:96:13) | |
at Assertion.eql (/home/travis/build/deliveryhero/rps-kyc/node_modules/expect.js/index.js:230:10) | |
at IncomingMessage.<anonymous> (/home/travis/build/deliveryhero/rps-kyc/test/system/StartOnboarding.spec.ts:51:33) | |
at emitOne (events.js:96:13) | |
at IncomingMessage.emit (events.js:188:7) | |
at readableAddChunk (_stream_readable.js:176:18) | |
at IncomingMessage.Readable.push (_stream_readable.js:134:10) | |
at HTTPParser.parserOnBody (_http_common.js:123:22) | |
at Socket.socketOnData (_http_client.js:363:20) | |
at emitOne (events.js:96:13) | |
at Socket.emit (events.js:188:7) | |
at readableAddChunk (_stream_readable.js:176:18) | |
at Socket.Readable.push (_stream_readable.js:134:10) | |
at TCP.onread (net.js:548:20) | |
] | |
Serverless: exec stderr: [warning package.json: No license field | |
error Command failed with exit code 1. | |
] | |
Serverless: Offline error executing script [Error: Command failed: yarn test-system | |
warning package.json: No license field | |
error Command failed with exit code 1. | |
] | |
Serverless: Halting offline server | |
error Command failed with exit code 1. | |
error Command failed with exit code 1. | |
The command "AWS_REGION=eu-west-1 yarn test" exited with 1. | |
store build cache | |
nothing changed, not updating cache | |
Done. Your build exited with 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment