diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-10-17 09:31:35 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-10-23 10:36:47 +0200 |
commit | 08cdf65b9e1f5f6fc1f4063a8422c25005868e58 (patch) | |
tree | 12067bd15017d73d824bdc819124fbde026acda9 /lib | |
parent | 10bb8297ebe5fc01540b20c3fd365234779b6837 (diff) | |
download | gitlab-ce-08cdf65b9e1f5f6fc1f4063a8422c25005868e58.tar.gz |
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.rb | 5 |
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 } |