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

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

44 lines
867 B
Ruby
Raw Permalink Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :bulk_import_entity, class: 'BulkImports::Entity' do
bulk_import
source_type { :group_entity }
sequence(:source_full_path) { |n| "source-path-#{n}" }
sequence(:destination_namespace) { |n| "destination-path-#{n}" }
2023-04-23 21:23:45 +05:30
destination_slug { 'imported-entity' }
2022-11-25 23:54:43 +05:30
sequence(:source_xid)
2023-03-17 16:20:25 +05:30
migrate_projects { true }
2021-01-03 14:25:43 +05:30
trait(:group_entity) do
source_type { :group_entity }
end
trait(:project_entity) do
source_type { :project_entity }
end
2021-01-29 00:20:46 +05:30
trait :created do
status { 0 }
end
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
trait :failed do
status { -1 }
end
2021-01-03 14:25:43 +05:30
end
end