Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-24 18:15:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-24 18:15:02 +0300
commitc4b4a75c35cb2015c01ef0b60f8ad8baaaf889df (patch)
tree16eabfd63477e1904d7eb5d9f92f3e5a4e4d3e0f /spec/services/error_tracking
parente40c68997d44209aed2baf3a8ec6be9ae99fb0b5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/error_tracking')
-rw-r--r--spec/services/error_tracking/collect_error_service_spec.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/spec/services/error_tracking/collect_error_service_spec.rb b/spec/services/error_tracking/collect_error_service_spec.rb
index 2b16612dac3..faca3c12a48 100644
--- a/spec/services/error_tracking/collect_error_service_spec.rb
+++ b/spec/services/error_tracking/collect_error_service_spec.rb
@@ -51,25 +51,30 @@ RSpec.describe ErrorTracking::CollectErrorService do
end
end
- context 'unusual payload' do
+ context 'with unusual payload' do
let(:modified_event) { parsed_event }
+ let(:event) { described_class.new(project, nil, event: modified_event).execute }
- context 'missing transaction' do
+ context 'when transaction is missing' do
it 'builds actor from stacktrace' do
modified_event.delete('transaction')
- event = described_class.new(project, nil, event: modified_event).execute
+ expect(event.error.actor).to eq 'find()'
+ end
+ end
+
+ context 'when transaction is an empty string' do \
+ it 'builds actor from stacktrace' do
+ modified_event['transaction'] = ''
expect(event.error.actor).to eq 'find()'
end
end
- context 'timestamp is numeric' do
+ context 'when timestamp is numeric' do
it 'parses timestamp' do
modified_event['timestamp'] = '1631015580.50'
- event = described_class.new(project, nil, event: modified_event).execute
-
expect(event.occurred_at).to eq '2021-09-07T11:53:00.5'
end
end