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

Tests fail if lambda connecting to private resource #20

Closed
scotty-p opened this issue Jun 13, 2016 · 3 comments
Closed

Tests fail if lambda connecting to private resource #20

scotty-p opened this issue Jun 13, 2016 · 3 comments

Comments

@scotty-p
Copy link

Mocha tests use lambda-wrapper to run functions offline and test the output. If the lambda function needs to connect to a private resource, like an RDS database, the function times out and the test fails. Can the deployed lambda function be invoked instead of running locally?

@mpuittinen
Copy link
Contributor

We could add capability into lambda wrapper to connect to a deployed Lambda function and run tests using that.

@mpuittinen
Copy link
Contributor

Implemented capability to run the deployed function to lambda-wrapper + added the syntax required to run live lambdas to the test template. Published as package version 0.5.10

@scotty-p Can you check whether this enables you to run your tests against the deployed lambdas?

@scotty-p
Copy link
Author

I can confirm this works! I had to raise the timeout of the tests from 2 seconds to 5 seconds.

Created a pull request to fix the way the test template creates the lambda function name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants