diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-21 18:08:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-21 18:08:52 +0300 |
commit | a8f5aaa7081cc2d400fbac1106d9e94d02d70ab4 (patch) | |
tree | bac304f65fad253fe1081bc41d47997f1f87c7bd /spec/tasks | |
parent | 7e5b78ee035a9cb43c65c029e4305ff7357b07d2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/gitlab/db_rake_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb index 03fbd238ee9..41dbdb6cb20 100644 --- a/spec/tasks/gitlab/db_rake_spec.rb +++ b/spec/tasks/gitlab/db_rake_spec.rb @@ -201,9 +201,15 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout do let(:reindex) { double('reindex') } let(:indexes) { double('indexes') } + it 'cleans up any leftover indexes' do + expect(Gitlab::Database::Reindexing).to receive(:cleanup_leftovers!) + + run_rake_task('gitlab:db:reindex') + end + context 'when no index_name is given' do it 'uses all candidate indexes' do - expect(Gitlab::Database::Reindexing).to receive(:candidate_indexes).and_return(indexes) + expect(Gitlab::Database::PostgresIndex).to receive(:reindexing_support).and_return(indexes) expect(Gitlab::Database::Reindexing).to receive(:perform).with(indexes) run_rake_task('gitlab:db:reindex') @@ -214,7 +220,7 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout do let(:index) { double('index') } before do - allow(Gitlab::Database::Reindexing).to receive(:candidate_indexes).and_return(indexes) + allow(Gitlab::Database::PostgresIndex).to receive(:reindexing_support).and_return(indexes) end it 'calls the index rebuilder with the proper arguments' do |