-
Notifications
You must be signed in to change notification settings - Fork 0
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 ability to trigger errors in mock http mode #5
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
==========================================
+ Coverage 91.3% 92.39% +1.09%
==========================================
Files 9 9
Lines 207 263 +56
==========================================
+ Hits 189 243 +54
- Misses 12 13 +1
- Partials 6 7 +1
Continue to review full report at Codecov.
|
Add ability to document errors returned by any function. Add special headers to trigger errors while in mock mode. Note that only HTTP mode is supported as there is no mechanism for conveying a trigger through vanilla lambda. If we were to build a real or mock version of the lambda binary then the only way to interact with it is through the real lambda API or through the real AWS API Gateway. Neither of these enable us to add a trigger within a function or within a function decorator because they do not convey the state that we need without modifying the request body. As a result, this only works for HTTP mode but can still be used to test serverfull-gateway templates.
This prevent the tests from failing on a system that has port 9090 in use by selecting a port that is known to be available.
a1e95ac
to
b09b931
Compare
I had to rebase after merging log/stat injection. I also added a commit that adds dynamic port selection for the integration tests so we don't rely on a single "magic" port number. |
Add ability to document errors returned by any function.
Add special headers to trigger errors while in mock mode.
Note that only HTTP mode is supported as there is no mechanism for
conveying a trigger through vanilla lambda. If we were to build a real
or mock version of the lambda binary then the only way to interact with
it is through the real lambda API or through the real AWS API Gateway.
Neither of these enable us to add a trigger within a function or within
a function decorator because they do not convey the state that we need
without modifying the request body. As a result, this only works for
HTTP mode but can still be used to test serverfull-gateway templates.