diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-12 10:17:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-12 10:17:34 +0000 |
commit | 3a6238c2e23454c462ccd229b1802583e657bfd0 (patch) | |
tree | 808c1151b9916516e41cea4869791cbf3dab345f /spec/tasks | |
parent | c301cf0ca5fbb998c22be5d8033e77be4bf0a451 (diff) | |
download | gitlab-ce-3a6238c2e23454c462ccd229b1802583e657bfd0.tar.gz |
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.rb | 11 |
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) } |