2017-03-28 17:27:44 +00:00
|
|
|
RSpec.configure do |config|
|
|
|
|
config.before(:each, :repository) do
|
|
|
|
TestEnv.clean_test_path
|
|
|
|
end
|
2017-05-17 16:17:15 +00:00
|
|
|
|
|
|
|
config.before(:all, :broken_storage) do
|
|
|
|
FileUtils.rm_rf Gitlab.config.repositories.storages.broken['path']
|
|
|
|
end
|
|
|
|
|
|
|
|
config.before(:each, :broken_storage) do
|
|
|
|
allow(Gitlab::GitalyClient).to receive(:call) do
|
|
|
|
raise GRPC::Unavailable.new('Gitaly broken in this spec')
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab::Git::Storage::CircuitBreaker.reset_all!
|
|
|
|
end
|
2017-03-28 17:27:44 +00:00
|
|
|
end
|