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

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

require "spec_helper"

require_migration!

RSpec.describe ScheduleMigrateSharedVulnerabilityIdentifiers, :migration, feature_category: :vulnerability_management do
  describe "#up" do
    before do
      migrate!
    end

    it "schedules" do
      Gitlab::Database::BackgroundMigration::BatchedMigration.find_by!(
        job_class_name: described_class::MIGRATION,
        table_name: described_class::TABLE_NAME,
        column_name: described_class::BATCH_COLUMN,
        batch_size: described_class::BATCH_SIZE,
        sub_batch_size: described_class::SUB_BATCH_SIZE)
    end
  end

  describe '#down' do
    before do
      schema_migrate_down!
    end

    it "deletes" do
      expect(described_class::MIGRATION).not_to have_scheduled_batched_migration
    end
  end
end