Commit 80130930 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'ce-6481-use-elasticsearch-indexer-in-specs' into 'master'

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

See merge request gitlab-org/gitlab-ce!28369
parents 23660f3a d2425716
...@@ -135,7 +135,7 @@ module TestEnv ...@@ -135,7 +135,7 @@ module TestEnv
def clean_gitlab_test_path def clean_gitlab_test_path
Dir[TMP_TEST_PATH].each do |entry| 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) FileUtils.rm_rf(entry)
end end
end end
...@@ -312,6 +312,18 @@ module TestEnv ...@@ -312,6 +312,18 @@ module TestEnv
private 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 def factory_repo_path
@factory_repo_path ||= Rails.root.join('tmp', 'tests', factory_repo_name) @factory_repo_path ||= Rails.root.join('tmp', 'tests', factory_repo_name)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment