Skip to content

Commit

Permalink
fix: Don't mutate original enabled_environments
Browse files Browse the repository at this point in the history
Ensure enabled_environments contains test environment without mutating
original list.

See: getsentry#2269 (comment)
  • Loading branch information
ixti committed Mar 17, 2024
1 parent 7d29d3c commit ebf04a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setup_sentry_test(&block)
# set transport to DummyTransport, so we can easily intercept the captured events
dummy_config.transport.transport_class = Sentry::DummyTransport
# make sure SDK allows sending under the current environment
dummy_config.enabled_environments << dummy_config.environment unless dummy_config.enabled_environments.include?(dummy_config.environment)
dummy_config.enabled_environments |= [dummy_config.environment]
# disble async event sending
dummy_config.background_worker_threads = 0

Expand Down

0 comments on commit ebf04a4

Please sign in to comment.