summaryrefslogtreecommitdiff
path: root/spec/models/application_setting_spec.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-12 16:35:59 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-16 15:00:47 +0200
commit8823125eab3b9698c7fabecff5479b96aaea360c (patch)
tree3afa3e3668e818dca29ccbf6ed49f3c1e1dc6f2d /spec/models/application_setting_spec.rb
parentd4bd322dc74dc6802416404c90b42abef5eb7acc (diff)
downloadgitlab-ce-bvl-circuitbreaker-improvements.tar.gz
Allow configuring the circuitbreaker through the API and UIbvl-circuitbreaker-improvements
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r--spec/models/application_setting_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb
index 78cacf9ff5d..cf192691507 100644
--- a/spec/models/application_setting_spec.rb
+++ b/spec/models/application_setting_spec.rb
@@ -114,6 +114,19 @@ describe ApplicationSetting do
it { expect(setting.repository_storages).to eq(['default']) }
end
+ context 'circuitbreaker settings' do
+ [:circuitbreaker_failure_count_threshold,
+ :circuitbreaker_failure_wait_time,
+ :circuitbreaker_failure_reset_time,
+ :circuitbreaker_storage_timeout].each do |field|
+ it "Validates #{field} as number" do
+ is_expected.to validate_numericality_of(field)
+ .only_integer
+ .is_greater_than_or_equal_to(0)
+ end
+ end
+ end
+
context 'repository storages' do
before do
storages = {