test(aws-lambda): Add basic lambda layer e2e test #12279
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an e2e (or rather integration) test for our AWS lambda layer bundle. The motivation for this test is that we broke the layer during the initial v8 releases (multiple times for different reasons) without us noticing this in tests. Simply because we never tested the bundled SDK code that we create and publish for the lambda layer.
The new e2e test tries to simulate a lambda environment by:
-r
argument to auto-init the SDK.This is not the most sophisticated setup and definitely not fully E2E as we don't auto deploy anything to AWS. However, it's a good start and a relatively simple way to ensure at least basic functionality. This test would have caught all the layer-specific bugs we missed in the initial v8 releases.
Note: I had to make some adjustments to the proxy server to basically not always forward events to Sentry if you specify the respective flag when starting the proxy server. This is because we can't pass a tunnel option to the layer without calling
Sentry.init
explicitly in the code (which defeats the purpose of this test).