diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-24 12:58:10 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-24 12:58:10 +0300 |
commit | 28b6f09fcc1ea50c44e942ed6c342a42bdf12dc4 (patch) | |
tree | 74c134e4bd656a67d8a5da86fcfa5356cd35603c /spec | |
parent | 0b7377d86e6d424f96925e7c803621d1511eb418 (diff) | |
parent | 065ab3e5f302434a189038aa46a475154c79a91d (diff) | |
download | gitlab-ce-28b6f09fcc1ea50c44e942ed6c342a42bdf12dc4.tar.gz |
Merge pull request #7823 from cirosantilli/test-fetch-shell
Only clone GitLab Shell on tests if necessary.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/test_env.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index e67c29a6783..4b0a3856f89 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -17,7 +17,11 @@ module TestEnv tmp_test_path = Rails.root.join('tmp', 'tests') if File.directory?(tmp_test_path) - FileUtils.rm_r(tmp_test_path) + Dir.entries(tmp_test_path).each do |entry| + unless ['.', '..', 'gitlab-shell'].include?(entry) + FileUtils.rm_r(File.join(tmp_test_path, entry)) + end + end end FileUtils.mkdir_p(tmp_test_path) @@ -38,9 +42,7 @@ module TestEnv end def setup_gitlab_shell - unless File.directory?(Gitlab.config.gitlab_shell.path) - %x[rake gitlab:shell:install] - end + `rake gitlab:shell:install` end def setup_factory_repo |