test(node): Test proxy server #10156
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 integration that tests the
proxy
transport option.To do this I've added a
.withMockSentryServer()
feature to the test runner.When optionally enabled, a basic express server is started which listens with an envelope endpoint. Test scenarios can then use the
SENTRY_DSN
environment variable to set the correct DSN.Why a Sentry server when we have this new stdout transport for testing?
We need to test the transport and assosiated things like the proxy option which can't use stdout parsing.
Why use the stdout transport at all if we can just use this server?
Resources when running tests in parallel?
Because they use the same test runner, it's relatively simple to migrate tests between the two, so once we have a full test suite we can test this further.