summaryrefslogtreecommitdiff
path: root/spec/support/stored_repositories.rb
blob: f3deae0f45531abf65ec8ee4f1de0bd2ffce212b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
RSpec.configure do |config|
  config.before(:each, :repository) do
    TestEnv.clean_test_path
  end

  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
end