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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-12 13:17:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-12 13:17:34 +0300
commit3a6238c2e23454c462ccd229b1802583e657bfd0 (patch)
tree808c1151b9916516e41cea4869791cbf3dab345f /spec/tasks
parentc301cf0ca5fbb998c22be5d8033e77be4bf0a451 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-ee
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/gitlab/background_migrations_rake_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/background_migrations_rake_spec.rb b/spec/tasks/gitlab/background_migrations_rake_spec.rb
index 98920df71ee..36623e86f27 100644
--- a/spec/tasks/gitlab/background_migrations_rake_spec.rb
+++ b/spec/tasks/gitlab/background_migrations_rake_spec.rb
@@ -42,6 +42,17 @@ RSpec.describe 'gitlab:background_migrations namespace rake tasks' do
end
end
+ context 'with a null parameter' do
+ let(:arguments) { %w[ProjectNamespaces::BackfillProjectNamespaces projects id] + ['[null\, "up"]'] }
+
+ it 'finalizes the matching migration' do
+ expect(Gitlab::Database::BackgroundMigration::BatchedMigrationRunner).to receive(:finalize)
+ .with('ProjectNamespaces::BackfillProjectNamespaces', 'projects', 'id', [nil, "up"], connection: connection)
+
+ expect { finalize_task }.to output(/Done/).to_stdout
+ end
+ end
+
context 'when multiple database feature is enabled' do
subject(:finalize_task) { run_rake_task("gitlab:background_migrations:finalize:#{ci_database_name}", *arguments) }