diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-05 12:08:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-05 12:08:29 +0300 |
commit | dea522994156f9d427b1acc0a22b0e75ffe92c68 (patch) | |
tree | f1496d9c2151bf1096ef8c4234a2698d51eb24c6 /spec/migrations | |
parent | dfebbcd6b1e2fc7584d9cca1b982f5f12bd648cb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/20230517163300_queue_backfill_root_storage_statistics_fork_storage_sizes_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/migrations/20230517163300_queue_backfill_root_storage_statistics_fork_storage_sizes_spec.rb b/spec/migrations/20230517163300_queue_backfill_root_storage_statistics_fork_storage_sizes_spec.rb new file mode 100644 index 00000000000..f7052020005 --- /dev/null +++ b/spec/migrations/20230517163300_queue_backfill_root_storage_statistics_fork_storage_sizes_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe QueueBackfillRootStorageStatisticsForkStorageSizes, feature_category: :consumables_cost_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: :namespace_root_storage_statistics, + 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 |