summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-10-05 15:01:52 +0000
committerDouwe Maan <douwe@gitlab.com>2017-10-05 15:01:52 +0000
commitcd60a02ad94088ae1444ac9a8b355b4d05fc30a3 (patch)
tree630cb144211ad5663fd35751c53b5c54823279f4 /lib/tasks
parente3e1ced743162f0658f2bee7a34555ccb3a37ba7 (diff)
parentf879c58706305600fc894e9e2ce8b972c0da1d87 (diff)
downloadgitlab-ce-cd60a02ad94088ae1444ac9a8b355b4d05fc30a3.tar.gz
Merge branch 'zj-gitaly-namespace-service' into 'master'
Gitaly namespace service enabled for GitLab See merge request gitlab-org/gitlab-ce!14274
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/gitaly.rake7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake
index 08677a98fc1..8377fe3269d 100644
--- a/lib/tasks/gitlab/gitaly.rake
+++ b/lib/tasks/gitlab/gitaly.rake
@@ -50,6 +50,8 @@ namespace :gitlab do
# only generate a configuration for the most common and simplest case: when
# we have exactly one Gitaly process and we are sure it is running locally
# because it uses a Unix socket.
+ # For development and testing purposes, an extra storage is added to gitaly,
+ # which is not known to Rails, but must be explicitly stubbed.
def gitaly_configuration_toml(gitaly_ruby: true)
storages = []
address = nil
@@ -67,6 +69,11 @@ namespace :gitlab do
storages << { name: key, path: val['path'] }
end
+
+ if Rails.env.test?
+ storages << { name: 'test_second_storage', path: Rails.root.join('tmp', 'tests', 'second_storage').to_s }
+ end
+
config = { socket_path: address.sub(%r{\Aunix:}, ''), storage: storages }
config[:auth] = { token: 'secret' } if Rails.env.test?
config[:'gitaly-ruby'] = { dir: File.join(Dir.pwd, 'ruby') } if gitaly_ruby