diff options
author | Stan Hu <stanhu@gmail.com> | 2019-01-23 21:49:28 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-01-23 21:49:28 +0000 |
commit | 3effc289ca2765a45867525ba34491008ff6cf04 (patch) | |
tree | 44fae73668994fe1ce37d92767f93566e73851a4 /spec/support | |
parent | 8d90f81731ccc10f3239fecfd232f84bdae23665 (diff) | |
parent | 3ee9bca5030d72061db2437675207cb0ddd0ec41 (diff) | |
download | gitlab-ce-3effc289ca2765a45867525ba34491008ff6cf04.tar.gz |
Merge branch 'custom-gitaly-url' into 'master'
Allow Gitaly to be built from a custom URL
See merge request gitlab-org/gitlab-ce!24616
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/test_env.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index d352a7cdf1a..f485eb7b0eb 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -160,11 +160,12 @@ module TestEnv def setup_gitaly socket_path = Gitlab::GitalyClient.address('default').sub(/\Aunix:/, '') gitaly_dir = File.dirname(socket_path) + install_gitaly_args = [gitaly_dir, repos_path, gitaly_url].compact.join(',') component_timed_setup('Gitaly', install_dir: gitaly_dir, version: Gitlab::GitalyClient.expected_server_version, - task: "gitlab:gitaly:install[#{gitaly_dir},#{repos_path}]") do + task: "gitlab:gitaly:install[#{install_gitaly_args}]") do Gitlab::SetupHelper.create_gitaly_configuration(gitaly_dir, { 'default' => repos_path }, force: true) start_gitaly(gitaly_dir) @@ -215,6 +216,10 @@ module TestEnv # The process can already be gone if the test run was INTerrupted. end + def gitaly_url + ENV.fetch('GITALY_REPO_URL', nil) + end + def setup_factory_repo setup_repo(factory_repo_path, factory_repo_path_bare, factory_repo_name, BRANCH_SHA) |