mweagle / Sparta

go microservices, powered by AWS Lambda
https://gosparta.io
MIT License
716 stars 48 forks source link

mockAPIGatewayRequest to match APIGatewayLambdaJSONEvent. #35

Closed mjuarez closed 7 years ago

mjuarez commented 7 years ago

Problem

explore.NewAPIGatewayRequest seems to create a JSON event that doesn't match sparta.APIGatewayLambdaJSONEvent

Solution

Update mockAPIGatewayRequest to match APIGatewayLambdaJSONEvent. Add test to see if mock request can be unmarshalled.

mweagle commented 7 years ago

LGTM - merging.