From 3efaf5b56d7942b431c570b2176bceb8c400bd58 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Wed, 24 Oct 2018 10:43:31 +0200 Subject: Hotfix for Rspec and second storage Rails requires a second storage for testing cross shard features. Gitaly will not boot if this second storage doesn't exist. So this will create this storage without adding it to the list of storages that Rails knows about. --- spec/support/helpers/test_env.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index 71287f28171..71d72ff27e9 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -168,6 +168,8 @@ module TestEnv return end + FileUtils.mkdir_p("tmp/tests/second_storage") unless File.exist?("tmp/tests/second_storage") + spawn_script = Rails.root.join('scripts/gitaly-test-spawn').to_s Bundler.with_original_env do raise "gitaly spawn failed" unless system(spawn_script) -- cgit v1.2.1