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

batched_jobs.rb « background_migration « database « gitlab « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c7dcd03701fcfcc86cd7d4ead3c884192b1cfd0 (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 :batched_background_migration_job, class: '::Gitlab::Database::BackgroundMigration::BatchedJob' do
    batched_migration factory: :batched_background_migration

    min_value { 1 }
    max_value { 10 }
    batch_size { 5 }
    sub_batch_size { 1 }
    pause_ms { 100 }

    trait(:pending) do
      status { 0 }
    end

    trait(:running) do
      status { 1 }
    end

    trait(:failed) do
      status { 2 }
    end

    trait(:succeeded) do
      status { 3 }
    end
  end
end