diff options
author | Rémy Coutable <remy@rymai.me> | 2019-05-20 10:07:59 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-05-20 10:07:59 +0000 |
commit | 801309308e677e724c772fddb1b99b0012453395 (patch) | |
tree | 403eb7e4951eec7c2021b20288439d649944f61d | |
parent | 23660f3ae424824db803ce4794240f718157b045 (diff) | |
parent | d2425716aa9f084d68fecae74688a3f6dac24ce2 (diff) | |
download | gitlab-ce-801309308e677e724c772fddb1b99b0012453395.tar.gz |
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
-rw-r--r-- | GITLAB_ELASTICSEARCH_INDEXER_VERSION | 1 | ||||
-rw-r--r-- | spec/support/helpers/test_env.rb | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/GITLAB_ELASTICSEARCH_INDEXER_VERSION b/GITLAB_ELASTICSEARCH_INDEXER_VERSION new file mode 100644 index 00000000000..9084fa2f716 --- /dev/null +++ b/GITLAB_ELASTICSEARCH_INDEXER_VERSION @@ -0,0 +1 @@ +1.1.0 diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index dc902d373b8..06b5ecdf150 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -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 |