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

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

38 lines
624 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :bulk_import_batch_tracker, class: 'BulkImports::BatchTracker' do
association :tracker, factory: :bulk_import_tracker
status { 0 }
fetched_objects_count { 1000 }
imported_objects_count { 1000 }
sequence(:batch_number) { |n| n }
trait :created do
status { 0 }
end
trait :started do
status { 1 }
end
trait :finished do
status { 2 }
end
trait :timeout do
status { 3 }
end
trait :failed do
status { -1 }
end
trait :skipped do
status { -2 }
end
end
end