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: 3d5d88954ed1fb170669efd9706648b22886b9ed (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
# 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}" }
    sequence(:jid) { |n| "bulk_import_entity_#{n}" }

    trait :started do
      status { 1 }
    end

    trait :finished do
      status { 2 }
    end

    trait :failed do
      status { -1 }
    end

    trait :skipped do
      status { -2 }
    end

    trait :batched do
      batched { true }
    end

    trait :stale do
      created_at { 1.day.ago }
    end
  end
end