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-17 11:50:32 +0200
commit38af7c1613e75561b405b15d6b8db1724da59ef6 (patch)
tree34de73892347f108718e3f00dea878632a75ce69 /spec/models/application_setting_spec.rb
parent619021fd7a6ac68e2821f89f746fea3a72c25e3b (diff)
downloadgitlab-ce-38af7c1613e75561b405b15d6b8db1724da59ef6.tar.gz
Allow configuring the circuitbreaker through the API and UI
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 = {