Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/bulk_import/exports.rb')
-rw-r--r--spec/factories/bulk_import/exports.rb24
1 files changed, 24 insertions, 0 deletions
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