summaryrefslogtreecommitdiff
path: root/spec/support/test_env.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/test_env.rb')
-rw-r--r--spec/support/test_env.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb
index 426bf53f198..be5331e4770 100644
--- a/spec/support/test_env.rb
+++ b/spec/support/test_env.rb
@@ -80,8 +80,9 @@ module TestEnv
end
def setup_gitlab_shell
- unless File.directory?(Rails.root.join(*%w(tmp tests gitlab-shell)))
- `rake gitlab:shell:install`
+ unless File.directory?(Gitlab.config.gitlab_shell.path)
+ # TODO: Remove `[shards]` when gitlab-shell v3.1.0 is published
+ `rake gitlab:shell:install[shards]`
end
end
@@ -127,14 +128,14 @@ module TestEnv
def copy_repo(project)
base_repo_path = File.expand_path(factory_repo_path_bare)
- target_repo_path = File.expand_path(repos_path + "/#{project.namespace.path}/#{project.path}.git")
+ target_repo_path = File.expand_path(project.repository_storage_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
- Gitlab.config.gitlab_shell.repos_path
+ Gitlab.config.repositories.storages.default
end
def backup_path
@@ -143,7 +144,7 @@ module TestEnv
def copy_forked_repo_with_submodules(project)
base_repo_path = File.expand_path(forked_repo_path_bare)
- target_repo_path = File.expand_path(repos_path + "/#{project.namespace.path}/#{project.path}.git")
+ target_repo_path = File.expand_path(project.repository_storage_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