2019-01-09 21:04:27 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
2021-08-04 03:09:14 +00:00
|
|
|
# There is an issue to rename this class https://gitlab.com/gitlab-org/gitlab/-/issues/323342.
|
|
|
|
factory :error_tracking_sentry_error, class: 'Gitlab::ErrorTracking::Error' do
|
2020-01-29 12:09:08 +00:00
|
|
|
id { '1' }
|
2019-10-02 00:06:26 +00:00
|
|
|
title { 'title' }
|
|
|
|
type { 'error' }
|
|
|
|
user_count { 1 }
|
|
|
|
count { 2 }
|
2020-01-29 12:09:08 +00:00
|
|
|
first_seen { Time.now.iso8601 }
|
|
|
|
last_seen { Time.now.iso8601 }
|
2019-10-02 00:06:26 +00:00
|
|
|
message { 'message' }
|
|
|
|
culprit { 'culprit' }
|
|
|
|
external_url { 'http://example.com/id' }
|
|
|
|
project_id { 'project1' }
|
|
|
|
project_name { 'project name' }
|
|
|
|
project_slug { 'project_name' }
|
|
|
|
short_id { 'ID' }
|
|
|
|
status { 'unresolved' }
|
2020-01-29 12:09:08 +00:00
|
|
|
frequency do
|
|
|
|
[
|
|
|
|
[Time.now.to_i, 10]
|
|
|
|
]
|
|
|
|
end
|
2019-01-09 21:04:27 +00:00
|
|
|
|
|
|
|
skip_create
|
|
|
|
end
|
2021-08-04 03:09:14 +00:00
|
|
|
|
|
|
|
factory :error_tracking_error, class: 'ErrorTracking::Error' do
|
|
|
|
project
|
|
|
|
name { 'ActionView::MissingTemplate' }
|
|
|
|
description { 'Missing template posts/edit' }
|
|
|
|
actor { 'PostsController#edit' }
|
|
|
|
platform { 'ruby' }
|
|
|
|
first_seen_at { Time.now.iso8601 }
|
|
|
|
last_seen_at { Time.now.iso8601 }
|
2021-08-11 21:10:33 +00:00
|
|
|
status { 'unresolved' }
|
|
|
|
|
|
|
|
trait :resolved do
|
|
|
|
status { 'resolved' }
|
|
|
|
end
|
2021-08-04 03:09:14 +00:00
|
|
|
end
|
2019-01-09 21:04:27 +00:00
|
|
|
end
|