Commit 7783f5ec authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve copy test repo cmd

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent a35a22ae
...@@ -90,4 +90,3 @@ class Spinach::Features::ExploreGroupsFeature < Spinach::FeatureSteps ...@@ -90,4 +90,3 @@ class Spinach::Features::ExploreGroupsFeature < Spinach::FeatureSteps
) )
end end
end end
...@@ -49,15 +49,16 @@ module TestEnv ...@@ -49,15 +49,16 @@ module TestEnv
unless File.directory?(repo_path) unless File.directory?(repo_path)
git_cmd = %W(git clone --bare #{clone_url} #{repo_path}) git_cmd = %W(git clone --bare #{clone_url} #{repo_path})
puts git_cmd.inspect
system(*git_cmd) system(*git_cmd)
end end
end end
def copy_repo(project) def copy_repo(project)
base_repo_path = repos_path + "/root/testme.git" base_repo_path = File.expand_path(repos_path + "/root/testme.git")
target_repo_path = repos_path + "/#{project.namespace.path}/#{project.path}.git" target_repo_path = File.expand_path(repos_path + "/#{project.namespace.path}/#{project.path}.git")
FileUtils.cp_r(base_repo_path, target_repo_path) FileUtils.mkdir_p(target_repo_path)
FileUtils.cp_r("#{base_repo_path}/.", target_repo_path)
FileUtils.chmod_R 0755, target_repo_path
end end
def repos_path def repos_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment