From 0b4bb101eaea8ec7c26b5d4bccc3a5a565c721d4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 1 Oct 2020 18:10:20 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/lib/gitlab/database/reindexing_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spec/lib/gitlab/database/reindexing_spec.rb') 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 -- cgit v1.2.3