summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-29 19:49:59 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-29 19:49:59 +0300
commitefcac2befc8d890c61dec434e238520ab401fa46 (patch)
tree0a6625d79661151fb150b497e08a5c66d7895129 /spec
parent9654cbb5924c968cdefcb83732b313c54fe292d1 (diff)
parentb49dd2c57306b53006a628ba28a830b7a431d16f (diff)
downloadgitlab-ce-efcac2befc8d890c61dec434e238520ab401fa46.tar.gz
Merge pull request #7873 from cirosantilli/testme-to-gitlabtest
Replace testme with gitlab-test.
Diffstat (limited to 'spec')
-rw-r--r--spec/support/test_env.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 4b0a3856f89..5f55871dc4a 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -46,17 +46,16 @@ module TestEnv
end
def setup_factory_repo
- repo_path = repos_path + "/root/testme.git"
- clone_url = 'https://gitlab.com/gitlab-org/gitlab-test.git'
+ clone_url = "https://gitlab.com/gitlab-org/#{factory_repo_name}.git"
- unless File.directory?(repo_path)
- git_cmd = %W(git clone --bare #{clone_url} #{repo_path})
+ unless File.directory?(factory_repo_path)
+ git_cmd = %W(git clone --bare #{clone_url} #{factory_repo_path})
system(*git_cmd)
end
end
def copy_repo(project)
- base_repo_path = File.expand_path(repos_path + "/root/testme.git")
+ base_repo_path = File.expand_path(factory_repo_path)
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)
@@ -66,4 +65,14 @@ module TestEnv
def repos_path
Gitlab.config.gitlab_shell.repos_path
end
+
+ private
+
+ def factory_repo_path
+ @factory_repo_path ||= repos_path + "/root/#{factory_repo_name}.git"
+ end
+
+ def factory_repo_name
+ 'gitlab-test'
+ end
end