Commit fc01042f authored by Kim "BKC" Carlbäcker's avatar Kim "BKC" Carlbäcker

Add a disable_gitaly flag for specs

parent 7d2a2035
......@@ -26,7 +26,7 @@ describe Projects::UpdateRepositoryStorageService do
FileUtils.rm_rf('tmp/tests/storage_b')
end
context 'without wiki', :skip_gitaly_mock do
context 'without wiki', :disable_gitaly do
let(:project) { create(:project, :repository, repository_storage: 'a', repository_read_only: true, wiki_enabled: false) }
context 'when the move succeeds' do
......@@ -60,7 +60,7 @@ describe Projects::UpdateRepositoryStorageService do
end
end
context 'with wiki', :skip_gitaly_mock do
context 'with wiki', :disable_gitaly do
let(:project) { create(:project, :repository, repository_storage: 'a', repository_read_only: true, wiki_enabled: true) }
let(:repository_double) { double(:repository) }
let(:wiki_repository_double) { double(:repository) }
......
RSpec.configure do |config|
config.before(:each) do |example|
if example.metadata[:skip_gitaly_mock]
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment