Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lambda test server for integration tests #139

Merged
merged 9 commits into from Nov 2, 2019

Conversation

martincostello
Copy link
Owner

@martincostello martincostello commented Nov 2, 2019

Add infrastructure that builds on top of TestServer to allow a Lambda to be tested like a black box, rather than directly invoking the function, with LambdaBootstrap for a custom runtime.

Also simplifies the code that sets up the handler wrapper.

Add infrastructure that builds on top of TestServer to allow a Lambda to be tested like a black box, rather than directly invoking the function, with LambdaBootstrap for a custom runtime.
Add an extension method for handling string content instead of raw bytes.
Add a test for handling multiple requests.
Simplify the code that sets up the handler wrapper.
Rename TestLambdaServer* to LambdaTestServer*.
@martincostello martincostello added this to the Future milestone Nov 2, 2019
@martincostello martincostello self-assigned this Nov 2, 2019
Add some more validation.
Add some more comments.
Rename method to match TestServer.
Emulate the runtime more accurately by providing environment variables and headers to fully populate the LambdaContext (except Cognito identities).
Add support for specifying the client context and Cognito identity for the AWS Mobile SDK.
Refactor to use class for requests (with helpers) rather than primitive types.
Fix incorrect log messages.
Add an end-to-end test for the function using LambdaTestServer.
Fix invalid SkillRequest objects.
Do not clear the environment variables on shutdown as it can cause race conditions between LambdaTestServer instances.
Instead, just provide a public static method to do it if the user wants to do it themselves.
@martincostello martincostello merged commit 8a9e37d into master Nov 2, 2019
3 checks passed
@martincostello martincostello deleted the Test-Lambda-Server branch Nov 2, 2019
@martincostello martincostello modified the milestones: Future, 2.0.1 Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant