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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/migrations/20230613192703_ensure_ci_build_needs_big_int_backfill_is_finished_for_self_hosts_spec.rb')
-rw-r--r--spec/migrations/20230613192703_ensure_ci_build_needs_big_int_backfill_is_finished_for_self_hosts_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/migrations/20230613192703_ensure_ci_build_needs_big_int_backfill_is_finished_for_self_hosts_spec.rb b/spec/migrations/20230613192703_ensure_ci_build_needs_big_int_backfill_is_finished_for_self_hosts_spec.rb
new file mode 100644
index 00000000000..0fe9cecb729
--- /dev/null
+++ b/spec/migrations/20230613192703_ensure_ci_build_needs_big_int_backfill_is_finished_for_self_hosts_spec.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!
+
+RSpec.describe EnsureCiBuildNeedsBigIntBackfillIsFinishedForSelfHosts, migration: :gitlab_ci, feature_category: :continuous_integration do
+ describe '#up' do
+ let(:migration_arguments) do
+ {
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'ci_build_needs',
+ column_name: 'id',
+ job_arguments: [['id'], ['id_convert_to_bigint']]
+ }
+ end
+
+ it 'ensures the migration is completed' do
+ expect_next_instance_of(described_class) do |instance|
+ expect(instance).to receive(:ensure_batched_background_migration_is_finished).with(migration_arguments)
+ end
+
+ migrate!
+ end
+ end
+end