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

batch_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: 427eefc5f3ea8b2876c542e8b85d486bb5579d8c (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
30
31
32
33
34
35
36
37
# 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