diff options
author | Rémy Coutable <remy@gitlab.com> | 2017-03-28 17:27:44 +0000 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-03-29 19:16:50 -0700 |
commit | 60c0c0f3d08aa2c2a5be68aa784a86304fdb9c99 (patch) | |
tree | 36fc5767de0d2d9bdd7a996677d3130a43f7ea95 /spec/support/test_env.rb | |
parent | 97a5e91bbe9449a448fae5373cbf91087578cbc6 (diff) | |
download | gitlab-ce-60c0c0f3d08aa2c2a5be68aa784a86304fdb9c99.tar.gz |
Merge branch '29843-project-subgroup-transfer' into 'security'
Use full path for moving directories when changing namespace path
See merge request !2078
Diffstat (limited to 'spec/support/test_env.rb')
-rw-r--r-- | spec/support/test_env.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 648b0380f18..54e222e44bf 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -61,9 +61,6 @@ module TestEnv clean_test_path - FileUtils.mkdir_p(repos_path) - FileUtils.mkdir_p(backup_path) - # Setup GitLab shell for test instance setup_gitlab_shell @@ -95,10 +92,14 @@ module TestEnv tmp_test_path = Rails.root.join('tmp', 'tests', '**') Dir[tmp_test_path].each do |entry| - unless File.basename(entry) =~ /\Agitlab-(shell|test|test-fork)\z/ + unless File.basename(entry) =~ /\Agitlab-(shell|test|test_bare|test-fork)\z/ FileUtils.rm_rf(entry) end end + + FileUtils.mkdir_p(repos_path) + FileUtils.mkdir_p(backup_path) + FileUtils.mkdir_p(pages_path) end def setup_gitlab_shell @@ -151,6 +152,10 @@ module TestEnv Gitlab.config.backup.path end + def pages_path + Gitlab.config.pages.path + end + def copy_forked_repo_with_submodules(project) base_repo_path = File.expand_path(forked_repo_path_bare) target_repo_path = File.expand_path(project.repository_storage_path + "/#{project.full_path}.git") |