From 968674e41798c437b9ebf4a9731fe2f2a4f07024 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Wed, 12 Jun 2019 15:32:29 +0200 Subject: Move Gitaly feature flag logic to Feature::Gitaly The GitalyClient held a lot of logic which was all very tightly coupled. In this instance the feature logic was extracted to make it do just a little less and create a bit more focus in the GitalyClient's responsibilies. --- spec/lib/gitlab/gitaly_client_spec.rb | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'spec/lib/gitlab/gitaly_client_spec.rb') diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb index da1eb0c2618..eed233f1f3e 100644 --- a/spec/lib/gitlab/gitaly_client_spec.rb +++ b/spec/lib/gitlab/gitaly_client_spec.rb @@ -330,20 +330,6 @@ describe Gitlab::GitalyClient do end end - describe 'feature_enabled?' do - let(:feature_name) { 'my_feature' } - let(:real_feature_name) { "gitaly_#{feature_name}" } - - before do - allow(Feature).to receive(:enabled?).and_return(false) - end - - it 'returns false' do - expect(Feature).to receive(:enabled?).with(real_feature_name) - expect(described_class.feature_enabled?(feature_name)).to be(false) - end - end - describe 'timeouts' do context 'with default values' do before do -- cgit v1.2.1