2017-05-17 12:17:15 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-11-13 10:52:07 -05:00
|
|
|
describe Admin::HealthCheckController do
|
2017-05-17 12:17:15 -04:00
|
|
|
let(:admin) { create(:admin) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
sign_in(admin)
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'GET show' do
|
|
|
|
it 'loads the git storage 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
|
2017-11-13 10:52:07 -05:00
|
|
|
expect(Gitlab::Git::Storage::FailureInfo).to receive(:reset_all!)
|
2017-05-17 12:17:15 -04:00
|
|
|
|
|
|
|
post :reset_storage_health
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|