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
path: root/lib
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-10-17 10:31:35 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-10-23 11:36:47 +0300
commit08cdf65b9e1f5f6fc1f4063a8422c25005868e58 (patch)
tree12067bd15017d73d824bdc819124fbde026acda9 /lib
parent10bb8297ebe5fc01540b20c3fd365234779b6837 (diff)
Remove broken git storage for testing
Broken storage used to be used to test situations where the Git storage wasn't being reached. These days we can just mock the Gitaly response. But given the broken storage is removed now, Gitaly can take over control of the storage being reachable. If it's not, Gitaly won't boot. That's nice for situations where a disk wasn't mounted for instance. Gitaly MR: https://gitlab.com/gitlab-org/gitaly/merge_requests/675
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/setup_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/setup_helper.rb b/lib/gitlab/setup_helper.rb
index 4a745147858..2b7e12639be 100644
--- a/lib/gitlab/setup_helper.rb
+++ b/lib/gitlab/setup_helper.rb
@@ -32,7 +32,10 @@ module Gitlab
end
if Rails.env.test?
- storages << { name: 'test_second_storage', path: Rails.root.join('tmp', 'tests', 'second_storage').to_s }
+ storage_path = Rails.root.join('tmp', 'tests', 'second_storage').to_s
+
+ FileUtils.mkdir(storage_path) unless File.exist?(storage_path)
+ storages << { name: 'test_second_storage', path: storage_path }
end
config = { socket_path: address.sub(/\Aunix:/, ''), storage: storages }