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
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-08-14 11:59:10 +0300
committerDouwe Maan <douwe@gitlab.com>2018-08-14 11:59:10 +0300
commitd9614e701a932881e3b64a1785f91e524499541d (patch)
treeceedc04fd754e0fdd6802a3d21328bc3b173739c /spec/support/helpers/test_env.rb
parent2e03eac78e42dcd9230b68beeff987001fe42a96 (diff)
parenteb1a3798adb3836e4ebe641c8eb962b6f7220004 (diff)
Merge branch 'gitaly-install-path' into 'master'
Remove storage path dependency of gitaly install task See merge request gitlab-org/gitlab-ce!21101
Diffstat (limited to 'spec/support/helpers/test_env.rb')
-rw-r--r--spec/support/helpers/test_env.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb
index f392660d2c7..21103771d1f 100644
--- a/spec/support/helpers/test_env.rb
+++ b/spec/support/helpers/test_env.rb
@@ -67,6 +67,7 @@ module TestEnv
TMP_TEST_PATH = Rails.root.join('tmp', 'tests', '**')
REPOS_STORAGE = 'default'.freeze
+ BROKEN_STORAGE = 'broken'.freeze
# Test environment
#
@@ -157,10 +158,11 @@ module TestEnv
component_timed_setup('Gitaly',
install_dir: gitaly_dir,
version: Gitlab::GitalyClient.expected_server_version,
- task: "gitlab:gitaly:install[#{gitaly_dir}]") do
+ task: "gitlab:gitaly:install[#{gitaly_dir},#{repos_path}]") do
- # Always re-create config, in case it's outdated. This is fast anyway.
- Gitlab::SetupHelper.create_gitaly_configuration(gitaly_dir, force: true)
+ # Re-create config, to specify the broken storage path
+ storage_paths = { 'default' => repos_path, 'broken' => broken_path }
+ Gitlab::SetupHelper.create_gitaly_configuration(gitaly_dir, storage_paths, force: true)
start_gitaly(gitaly_dir)
end
@@ -256,6 +258,10 @@ module TestEnv
@repos_path ||= Gitlab.config.repositories.storages[REPOS_STORAGE].legacy_disk_path
end
+ def broken_path
+ @broken_path ||= Gitlab.config.repositories.storages[BROKEN_STORAGE].legacy_disk_path
+ end
+
def backup_path
Gitlab.config.backup.path
end