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

24 lines
497 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}" }
trait :started do
status { 1 }
sequence(:jid) { |n| "bulk_import_entity_#{n}" }
end
trait :finished do
status { 2 }
sequence(:jid) { |n| "bulk_import_entity_#{n}" }
end
2021-01-29 00:20:46 +05:30
end
end