we need to disable gitaly for some tests

This commit is contained in:
Kim "BKC" Carlbäcker 2017-11-14 19:53:32 +01:00
parent 3d24c01a19
commit 6545e56d92

View file

@ -1,6 +1,10 @@
RSpec.configure do |config|
config.before(:each) do |example|
next if example.metadata[:skip_gitaly_mock]
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(true)
if example.metadata[:disable_gitaly]
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(false)
else
next if example.metadata[:skip_gitaly_mock]
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(true)
end
end
end