2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
2021-10-27 15:23:28 +05:30
|
|
|
# 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-03-13 15:44:24 +05:30
|
|
|
id { '1' }
|
2019-12-21 20:55:43 +05:30
|
|
|
title { 'title' }
|
|
|
|
type { 'error' }
|
|
|
|
user_count { 1 }
|
|
|
|
count { 2 }
|
2020-03-13 15:44:24 +05:30
|
|
|
first_seen { Time.now.iso8601 }
|
|
|
|
last_seen { Time.now.iso8601 }
|
2019-12-21 20:55:43 +05:30
|
|
|
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-03-13 15:44:24 +05:30
|
|
|
frequency do
|
|
|
|
[
|
|
|
|
[Time.now.to_i, 10]
|
|
|
|
]
|
|
|
|
end
|
2019-02-15 15:39:39 +05:30
|
|
|
|
|
|
|
skip_create
|
|
|
|
end
|
2021-10-27 15:23:28 +05:30
|
|
|
|
|
|
|
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 }
|
|
|
|
status { 'unresolved' }
|
|
|
|
|
|
|
|
trait :resolved do
|
|
|
|
status { 'resolved' }
|
|
|
|
end
|
|
|
|
end
|
2019-02-15 15:39:39 +05:30
|
|
|
end
|