diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-01 21:10:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-01 21:10:20 +0300 |
commit | 0b4bb101eaea8ec7c26b5d4bccc3a5a565c721d4 (patch) | |
tree | caa37c67e707c54227e679832fc7cba2583a3363 /spec/lib/gitlab/database/reindexing_spec.rb | |
parent | 2d9c043ab8b576ed254a900cc57ce0bd763dfdcf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/database/reindexing_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/reindexing_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/reindexing_spec.rb b/spec/lib/gitlab/database/reindexing_spec.rb index 32580ae9e3a..26954a9a32f 100644 --- a/spec/lib/gitlab/database/reindexing_spec.rb +++ b/spec/lib/gitlab/database/reindexing_spec.rb @@ -52,4 +52,15 @@ RSpec.describe Gitlab::Database::Reindexing do it_behaves_like 'reindexing' end end + + describe '.candidate_indexes' do + subject { described_class.candidate_indexes } + + it 'retrieves regular indexes that are no left-overs from previous runs' do + result = double + expect(Gitlab::Database::PostgresIndex).to receive_message_chain('regular.not_match.not_match').with(no_args).with('^tmp_reindex_').with('^old_reindex_').and_return(result) + + expect(subject).to eq(result) + end + end end |