diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-13 18:08:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-13 18:08:11 +0300 |
commit | cb38c5062c623059d311c4e9e37428eacdea95d6 (patch) | |
tree | eefd77089ed22d00ed5247dd84c0b93473cdf9d4 /spec/migrations/20230302185739_queue_fix_vulnerability_reads_has_issues_spec.rb | |
parent | b4d5fdae4298581813f0bd5fec029da91f9dfe05 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations/20230302185739_queue_fix_vulnerability_reads_has_issues_spec.rb')
-rw-r--r-- | spec/migrations/20230302185739_queue_fix_vulnerability_reads_has_issues_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/migrations/20230302185739_queue_fix_vulnerability_reads_has_issues_spec.rb b/spec/migrations/20230302185739_queue_fix_vulnerability_reads_has_issues_spec.rb new file mode 100644 index 00000000000..54b1e231db2 --- /dev/null +++ b/spec/migrations/20230302185739_queue_fix_vulnerability_reads_has_issues_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe QueueFixVulnerabilityReadsHasIssues, feature_category: :vulnerability_management do + let!(:batched_migration) { described_class::MIGRATION } + + it 'schedules a new batched migration' do + reversible_migration do |migration| + migration.before -> { + expect(batched_migration).not_to have_scheduled_batched_migration + } + + migration.after -> { + expect(batched_migration).to have_scheduled_batched_migration( + table_name: :vulnerability_issue_links, + column_name: :vulnerability_id, + interval: described_class::DELAY_INTERVAL, + batch_size: described_class::BATCH_SIZE, + sub_batch_size: described_class::SUB_BATCH_SIZE, + max_batch_size: described_class::MAX_BATCH_SIZE + ) + } + end + end +end |