summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-08-07 14:56:15 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-08-07 14:56:15 +0000
commit5bf65c9306960cdbe9b64bf8f62dc909d1cc6440 (patch)
tree22a4b3a199fae27c64e849c6f8c805c2b5008e5c /spec/features
parentfa716921b8b136f5d4b09de9723568d5ac101f84 (diff)
parentfda83a6179ae63f094410942e95951b40c3ad24b (diff)
downloadgitlab-ce-5bf65c9306960cdbe9b64bf8f62dc909d1cc6440.tar.gz
Merge branch 'bvl-nfs-circuitbreaker' into 'master'
Circuitbreaker for storage paths Closes #32207, #33117, gitlab-com/infrastructure#1946, and gitlab-com/infrastructure#1775 See merge request !11449
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/admin/admin_health_check_spec.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/features/admin/admin_health_check_spec.rb b/spec/features/admin/admin_health_check_spec.rb
index 106e7370a98..37fd3e171eb 100644
--- a/spec/features/admin/admin_health_check_spec.rb
+++ b/spec/features/admin/admin_health_check_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature "Admin Health Check" do
+feature "Admin Health Check", feature: true, broken_storage: true do
include StubENV
before do
@@ -55,4 +55,26 @@ feature "Admin Health Check" do
expect(page).to have_content('The server is on fire')
end
end
+
+ context 'with repository storage failures' do
+ before do
+ # Track a failure
+ Gitlab::Git::Storage::CircuitBreaker.for_storage('broken').perform { nil } rescue nil
+ visit admin_health_check_path
+ end
+
+ it 'shows storage failure information' do
+ hostname = Gitlab::Environment.hostname
+
+ expect(page).to have_content('broken: failed storage access attempt on host:')
+ expect(page).to have_content("#{hostname}: 1 of 10 failures.")
+ end
+
+ it 'allows resetting storage failures' do
+ click_button 'Reset git storage health information'
+
+ expect(page).to have_content('Git storage health information has been reset')
+ expect(page).not_to have_content('failed storage access attempt')
+ end
+ end
end