diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-07 18:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-07 18:09:52 +0300 |
commit | e43077ab4742ba5083a01a1e5341db1a1b7a1701 (patch) | |
tree | c33a00fb176caff735243c484bbd594a3b08bb6e /spec/lib/gitlab/error_tracking_spec.rb | |
parent | 211a8c3361ccf4eb92f36edbdcf15c98fcdcc8b7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/error_tracking_spec.rb')
-rw-r--r-- | spec/lib/gitlab/error_tracking_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/error_tracking_spec.rb b/spec/lib/gitlab/error_tracking_spec.rb index 08718bc92a1..6764d48d14b 100644 --- a/spec/lib/gitlab/error_tracking_spec.rb +++ b/spec/lib/gitlab/error_tracking_spec.rb @@ -145,6 +145,17 @@ describe Gitlab::ErrorTracking do ) end + context 'with filterable parameters' do + let(:extra) { { test: 1, my_token: 'test' } } + + it 'filters parameters' do + expect(Gitlab::ErrorTracking::Logger).to receive(:error).with( + hash_including({ 'extra.test' => 1, 'extra.my_token' => '[FILTERED]' })) + + described_class.track_exception(exception, extra) + end + end + context 'the exception implements :sentry_extra_data' do let(:extra_info) { { event: 'explosion', size: :massive } } let(:exception) { double(message: 'bang!', sentry_extra_data: extra_info, backtrace: caller) } |