debian-mirror-gitlab/spec/factories/bulk_import/trackers.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
539 B
Ruby
Raw Normal View History

2021-01-29 00:20:46 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :bulk_import_tracker, class: 'BulkImports::Tracker' do
association :entity, factory: :bulk_import_entity
2021-04-17 20:07:23 +05:30
stage { 0 }
2021-01-29 00:20:46 +05:30
has_next_page { false }
2021-04-29 21:17:54 +05:30
sequence(:pipeline_name) { |n| "pipeline_name_#{n}" }
2023-03-04 22:38:38 +05:30
sequence(:jid) { |n| "bulk_import_entity_#{n}" }
2021-04-29 21:17:54 +05:30
trait :started do
status { 1 }
end
trait :finished do
status { 2 }
end
2021-09-04 01:27:46 +05:30
trait :failed do
status { -1 }
2023-03-04 22:38:38 +05:30
end
2021-09-04 01:27:46 +05:30
2023-03-04 22:38:38 +05:30
trait :skipped do
status { -2 }
2021-09-04 01:27:46 +05:30
end
2021-01-29 00:20:46 +05:30
end
end