diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 00:06:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 00:06:21 +0000 |
commit | 75687c79df805b57914d79cf217e3f08dbc77cc2 (patch) | |
tree | bff07aefc6467b8a7e00cd7649109fc6e8b7768f /spec/lib/sentry | |
parent | 0c3f12149372a79b825d265a6c28dc547e4a1afc (diff) | |
download | gitlab-ce-75687c79df805b57914d79cf217e3f08dbc77cc2.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/sentry')
-rw-r--r-- | spec/lib/sentry/client_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/sentry/client_spec.rb b/spec/lib/sentry/client_spec.rb index ca2b17b44e0..8101664d34f 100644 --- a/spec/lib/sentry/client_spec.rb +++ b/spec/lib/sentry/client_spec.rb @@ -192,6 +192,15 @@ describe Sentry::Client do end end + context 'sentry api response too large' do + it 'raises exception' do + deep_size = double('Gitlab::Utils::DeepSize', valid?: false) + allow(Gitlab::Utils::DeepSize).to receive(:new).with(sentry_api_response).and_return(deep_size) + + expect { subject }.to raise_error(Sentry::Client::ResponseInvalidSizeError, 'Sentry API response is too big. Limit is 1 MB.') + end + end + it_behaves_like 'maps exceptions' end |