diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-27 18:10:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-27 18:10:15 +0300 |
commit | 9979d2afd66e12d938ea55372dcf2d8105b5eaca (patch) | |
tree | 88df8f6a2f2ffba2fa1318dee83f58d6fe76d40d /spec/migrations | |
parent | fdf32113c3924f7faec91101282fc28ec42fc869 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/20230724071541_queue_backfill_default_branch_protection_namespace_setting_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/migrations/20230724071541_queue_backfill_default_branch_protection_namespace_setting_spec.rb b/spec/migrations/20230724071541_queue_backfill_default_branch_protection_namespace_setting_spec.rb new file mode 100644 index 00000000000..5ba8c6b853c --- /dev/null +++ b/spec/migrations/20230724071541_queue_backfill_default_branch_protection_namespace_setting_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe QueueBackfillDefaultBranchProtectionNamespaceSetting, feature_category: :database 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: :namespace_settings, + column_name: :namespace_id, + interval: described_class::DELAY_INTERVAL, + batch_size: described_class::BATCH_SIZE, + sub_batch_size: described_class::SUB_BATCH_SIZE + ) + } + end + end +end |