CE backport for "Use gitlab-elasticsearch-indexer in tests"

This commit is contained in:
Nick Thomas 2019-05-16 16:49:26 +01:00
parent 112193e8a6
commit d2425716aa
No known key found for this signature in database
GPG Key ID: 2A313A47AFADACE9
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1 @@
1.1.0

View File

@ -135,7 +135,7 @@ module TestEnv
def clean_gitlab_test_path
Dir[TMP_TEST_PATH].each do |entry|
if File.basename(entry) =~ /\A(gitlab-(test|test_bare|test-fork|test-fork_bare))\z/
unless test_dirs.include?(File.basename(entry))
FileUtils.rm_rf(entry)
end
end
@ -312,6 +312,18 @@ module TestEnv
private
# These are directories that should be preserved at cleanup time
def test_dirs
@test_dirs ||= %w[
gitaly
gitlab-shell
gitlab-test
gitlab-test_bare
gitlab-test-fork
gitlab-test-fork_bare
]
end
def factory_repo_path
@factory_repo_path ||= Rails.root.join('tmp', 'tests', factory_repo_name)
end