Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 22:30:35 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 22:30:35 +0400
commit7783f5ec73841fcd96dc3c86283b961e0459714a (patch)
treed6f98fba616cc5ea6848307bd471d90e4a082484 /spec
parenta35a22ae051d9b1ab97eb91ea4354baba2addf80 (diff)
Improve copy test repo cmd
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/support/test_env.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 1f930eac026..e7bc209d948 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -49,15 +49,16 @@ module TestEnv
unless File.directory?(repo_path)
git_cmd = %W(git clone --bare #{clone_url} #{repo_path})
- puts git_cmd.inspect
system(*git_cmd)
end
end
def copy_repo(project)
- base_repo_path = repos_path + "/root/testme.git"
- target_repo_path = repos_path + "/#{project.namespace.path}/#{project.path}.git"
- FileUtils.cp_r(base_repo_path, target_repo_path)
+ base_repo_path = File.expand_path(repos_path + "/root/testme.git")
+ target_repo_path = File.expand_path(repos_path + "/#{project.namespace.path}/#{project.path}.git")
+ FileUtils.mkdir_p(target_repo_path)
+ FileUtils.cp_r("#{base_repo_path}/.", target_repo_path)
+ FileUtils.chmod_R 0755, target_repo_path
end
def repos_path