summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-10-09 07:59:42 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-10-10 09:08:18 +0200
commit30b4ce940d28804e0b38ea9ea4f89793d41392db (patch)
treeecbf29b27a726867d260521dc799214a4cd6d4c4 /spec/controllers
parent550f55745a3be5f86bafaf25b3bcc90beba8e2ac (diff)
downloadgitlab-ce-30b4ce940d28804e0b38ea9ea4f89793d41392db.tar.gz
Remove Git circuit breaker
Was introduced in the time that GitLab still used NFS, which is not required anymore in most cases. By removing this, the API it calls will return empty responses. This interface has to be removed in the next major release, expected to be 12.0.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/admin/health_check_controller_spec.rb12
-rw-r--r--spec/controllers/application_controller_spec.rb24
-rw-r--r--spec/controllers/health_controller_spec.rb42
3 files changed, 2 insertions, 76 deletions
diff --git a/spec/controllers/admin/health_check_controller_spec.rb b/spec/controllers/admin/health_check_controller_spec.rb
index d15ee0021d9..e13401fc06b 100644
--- a/spec/controllers/admin/health_check_controller_spec.rb
+++ b/spec/controllers/admin/health_check_controller_spec.rb
@@ -8,18 +8,10 @@ describe Admin::HealthCheckController do
end
describe 'GET show' do
- it 'loads the git storage health information' do
+ it 'loads the health information' do
get :show
- expect(assigns[:failing_storage_statuses]).not_to be_nil
- end
- end
-
- describe 'POST reset_storage_health' do
- it 'resets all storage health information' do
- expect(Gitlab::Git::Storage::FailureInfo).to receive(:reset_all!)
-
- post :reset_storage_health
+ expect(assigns[:errors]).not_to be_nil
end
end
end
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 2b28cfd16cc..a8556771edd 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -190,30 +190,6 @@ describe ApplicationController do
end
end
- describe 'rescue from Gitlab::Git::Storage::Inaccessible' do
- controller(described_class) do
- def index
- raise Gitlab::Git::Storage::Inaccessible.new('broken', 100)
- end
- end
-
- it 'renders a 503 when storage is not available' do
- sign_in(create(:user))
-
- get :index
-
- expect(response.status).to eq(503)
- end
-
- it 'renders includes a Retry-After header' do
- sign_in(create(:user))
-
- get :index
-
- expect(response.headers['Retry-After']).to eq(100)
- end
- end
-
describe 'response format' do
controller(described_class) do
def index
diff --git a/spec/controllers/health_controller_spec.rb b/spec/controllers/health_controller_spec.rb
index d800ad7c187..ec73c89cb11 100644
--- a/spec/controllers/health_controller_spec.rb
+++ b/spec/controllers/health_controller_spec.rb
@@ -14,48 +14,6 @@ describe HealthController do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
end
- describe '#storage_check' do
- before do
- allow(Gitlab::RequestContext).to receive(:client_ip).and_return(whitelisted_ip)
- end
-
- subject { post :storage_check }
-
- it 'checks all the configured storages' do
- expect(Gitlab::Git::Storage::Checker).to receive(:check_all).and_call_original
-
- subject
- end
-
- it 'returns the check interval' do
- stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'true')
- stub_application_setting(circuitbreaker_check_interval: 10)
-
- subject
-
- expect(json_response['check_interval']).to eq(10)
- end
-
- context 'with failing storages', :broken_storage do
- before do
- stub_storage_settings(
- broken: { path: 'tmp/tests/non-existent-repositories' }
- )
- end
-
- it 'includes the failure information' do
- subject
-
- expected_results = [
- { 'storage' => 'broken', 'success' => false },
- { 'storage' => 'default', 'success' => true }
- ]
-
- expect(json_response['results']).to eq(expected_results)
- end
- end
- end
-
describe '#readiness' do
shared_context 'endpoint responding with readiness data' do
let(:request_params) { {} }