diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-30 15:12:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-30 15:12:30 +0300 |
commit | 6d19e491d1257b6fbc74f4cf3a30ddb28deaeaf4 (patch) | |
tree | e14c505a5e880c85161d8c5b17b23341b6c37a21 /spec/factories/bulk_import | |
parent | ea0085de54590ffde24fee2ced286961a419410d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories/bulk_import')
-rw-r--r-- | spec/factories/bulk_import/export_uploads.rb | 7 | ||||
-rw-r--r-- | spec/factories/bulk_import/exports.rb | 24 |
2 files changed, 31 insertions, 0 deletions
diff --git a/spec/factories/bulk_import/export_uploads.rb b/spec/factories/bulk_import/export_uploads.rb new file mode 100644 index 00000000000..9f03498b9d9 --- /dev/null +++ b/spec/factories/bulk_import/export_uploads.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :bulk_import_export_upload, class: 'BulkImports::ExportUpload' do + export { association(:bulk_import_export) } + end +end diff --git a/spec/factories/bulk_import/exports.rb b/spec/factories/bulk_import/exports.rb new file mode 100644 index 00000000000..dd8831ce33a --- /dev/null +++ b/spec/factories/bulk_import/exports.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :bulk_import_export, class: 'BulkImports::Export', traits: %i[started] do + group + relation { 'labels' } + + trait :started do + status { 0 } + + sequence(:jid) { |n| "bulk_import_export_#{n}" } + end + + trait :finished do + status { 1 } + + sequence(:jid) { |n| "bulk_import_export_#{n}" } + end + + trait :failed do + status { -1 } + end + end +end |