diff options
author | Markus Koller <mkoller@gitlab.com> | 2019-07-18 12:55:40 +0300 |
---|---|---|
committer | Markus Koller <mkoller@gitlab.com> | 2019-07-18 13:01:51 +0300 |
commit | 79c7eae39ab2b41ce4678b9640f5b393b7a291b2 (patch) | |
tree | df143d6225994644eda084175f8d60d9c8567e6d /spec/support/helpers/test_env.rb | |
parent | 0d1adc9f7f990254fd88ba03011908cc4f83461d (diff) |
Fix broken handling for outdated test repos
The call to init had the side effect of starting another Gitaly process,
and didn't actually correctly delete the test repositories.
Diffstat (limited to 'spec/support/helpers/test_env.rb')
-rw-r--r-- | spec/support/helpers/test_env.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index 893b10ea752..16938da50cc 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -141,14 +141,6 @@ module TestEnv FileUtils.mkdir_p(artifacts_path) end - def clean_gitlab_test_path - Dir[TMP_TEST_PATH].each do |entry| - unless test_dirs.include?(File.basename(entry)) - FileUtils.rm_rf(entry) - end - end - end - def setup_gitlab_shell component_timed_setup('GitLab Shell', install_dir: Gitlab.config.gitlab_shell.path, @@ -368,10 +360,7 @@ module TestEnv # Try to reset without fetching to avoid using the network. unless reset.call raise 'Could not fetch test seed repository.' unless system(*%W(#{Gitlab.config.git.bin_path} -C #{repo_path} fetch origin)) - - # Before we used Git clone's --mirror option, bare repos could end up - # with missing refs, clearing them and retrying should fix the issue. - clean_gitlab_test_path && init unless reset.call + raise "Could not update test seed repository, please delete #{repo_path} and try again" unless reset.call end end |