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

trackers.rb « bulk_import « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 22e0aa096fca1992d953c9d442c68daa079b8d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

FactoryBot.define do
  factory :bulk_import_tracker, class: 'BulkImports::Tracker' do
    association :entity, factory: :bulk_import_entity

    stage { 0 }
    has_next_page { false }
    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

    trait :failed do
      status { -1 }

      sequence(:jid) { |n| "bulk_import_entity_#{n}" }
    end
  end
end