diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-05 21:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-05 21:09:00 +0300 |
commit | bc3187f6d968f954c7998b66a6595273f9ecf5e1 (patch) | |
tree | 741d17bfcaebe80247f90e7529ffc397e071d3ff /spec/tasks | |
parent | 4001deba7325ebf380f0d60038107e56a3c7e2c3 (diff) |
Add latest changes from gitlab-org/gitlab@master
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) } |