Welcome to mirror list, hosted at ThFree Co, Russian Federation.

health_check_controller_spec.rb « admin « controllers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0b8e0c8a065fedeb239de3af922328c31111ce51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'spec_helper'

describe Admin::HealthCheckController, broken_storage: true do
  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
      expect(Gitlab::Git::Storage::CircuitBreaker).to receive(:reset_all!)

      post :reset_storage_health
    end
  end
end