diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-12 16:35:59 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-16 15:00:47 +0200 |
commit | 8823125eab3b9698c7fabecff5479b96aaea360c (patch) | |
tree | 3afa3e3668e818dca29ccbf6ed49f3c1e1dc6f2d /spec/models/application_setting_spec.rb | |
parent | d4bd322dc74dc6802416404c90b42abef5eb7acc (diff) | |
download | gitlab-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.rb | 13 |
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 = { |