Skip to content

refactor(test): rework Sentry.Test to use Bypass-based HTTP testing#1030

Draft
solnic wants to merge 1 commit intomasterfrom
refa/sentry-test-bypass-rework
Draft

refactor(test): rework Sentry.Test to use Bypass-based HTTP testing#1030
solnic wants to merge 1 commit intomasterfrom
refa/sentry-test-bypass-rework

Conversation

@solnic
Copy link
Copy Markdown
Collaborator

@solnic solnic commented Apr 2, 2026

Rewrite Sentry.Test to use Bypass for HTTP-level testing instead of in-memory event collection via NimbleOwnership. Events now travel the full pipeline (Client -> Transport -> HTTP) and are captured at the Bypass endpoint, while before_send callbacks capture full Elixir structs for assertion convenience.

Key changes:

  • Rewrite Sentry.Test with Bypass-backed setup_sentry/1 as primary API
  • Remove maybe_collect/1 calls from Client and Scheduler
  • Remove test_mode? bypass from Sentry.capture_exception/capture_message
  • Deprecate test_mode config option
  • Remove nimble_ownership dependency
  • Convert all test files to use Bypass-based assertions
  • Add Bypass envelope collector helpers to test support modules
  • Update integration tests to use HTTP envelope assertions

@solnic solnic force-pushed the refa/sentry-test-bypass-rework branch 2 times, most recently from 801cc91 to fa888c5 Compare April 3, 2026 14:16
Rewrite Sentry.Test to use Bypass for HTTP-level testing instead of
in-memory event collection via NimbleOwnership. Events now travel the
full pipeline (Client -> Transport -> HTTP) and are captured at the
Bypass endpoint, while before_send callbacks capture full Elixir structs
for assertion convenience.

Key changes:
- Rewrite Sentry.Test with Bypass-backed setup_sentry/1 as primary API
- Remove maybe_collect/1 calls from Client and Scheduler
- Remove test_mode? bypass from Sentry.capture_exception/capture_message
- Deprecate test_mode config option
- Remove nimble_ownership dependency
- Convert all test files to use Bypass-based assertions
- Add Bypass envelope collector helpers to test support modules
- Update integration tests to use HTTP envelope assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@solnic solnic force-pushed the refa/sentry-test-bypass-rework branch from fa888c5 to aa225a0 Compare April 3, 2026 14:22
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

Successfully merging this pull request may close these issues.

1 participant