From d83bbccfcd07ddab93be73959e3b149b75831e28 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 3 Oct 2022 18:08:19 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- ...ate_ci_pipeline_artifacts_locked_status_spec.rb | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb (limited to 'spec/migrations') diff --git a/spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb b/spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb new file mode 100644 index 00000000000..7e3f8caa966 --- /dev/null +++ b/spec/migrations/20220928225711_schedule_update_ci_pipeline_artifacts_locked_status_spec.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe ScheduleUpdateCiPipelineArtifactsLockedStatus, migration: :gitlab_ci do + let_it_be(:migration) { described_class::MIGRATION } + + describe '#up' do + it 'schedules background jobs for each batch of ci_pipeline_artifacts' do + migrate! + + expect(migration).to have_scheduled_batched_migration( + gitlab_schema: :gitlab_ci, + table_name: :ci_pipeline_artifacts, + column_name: :id, + batch_size: described_class::BATCH_SIZE, + sub_batch_size: described_class::SUB_BATCH_SIZE + ) + end + end + + describe '#down' do + it 'deletes all batched migration records' do + migrate! + schema_migrate_down! + + expect(migration).not_to have_scheduled_batched_migration + end + end +end -- cgit v1.2.3