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

cleanup_backfill_integrations_enable_ssl_verification_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1517405b358900afdb1c324c4e51c62645a23964 (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
# frozen_string_literal: true

require 'spec_helper'
require_migration!

RSpec.describe CleanupBackfillIntegrationsEnableSslVerification, :migration do
  let(:job_class_name) { 'BackfillIntegrationsEnableSslVerification' }

  before do
    # Jobs enqueued in Sidekiq.
    Sidekiq::Testing.disable! do
      BackgroundMigrationWorker.perform_in(10, job_class_name, [1, 2])
      BackgroundMigrationWorker.perform_in(20, job_class_name, [3, 4])
    end

    # Jobs tracked in the database.
    Gitlab::Database::BackgroundMigrationJob.create!(
      class_name: job_class_name,
      arguments: [5, 6],
      status: Gitlab::Database::BackgroundMigrationJob.statuses['pending']
    )
    Gitlab::Database::BackgroundMigrationJob.create!(
      class_name: job_class_name,
      arguments: [7, 8],
      status: Gitlab::Database::BackgroundMigrationJob.statuses['succeeded']
    )

    migrate!
  end

  it_behaves_like(
    'finalized tracked background migration',
    Gitlab::BackgroundMigration::BackfillIntegrationsEnableSslVerification
  )
end