Commit 97b2c7c6 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'bvl-port-storage-spec-helpers-from-ee' into 'master'

Add a helper to stub storage settings with defaults

See merge request !13419
parents 39493e45 016522dd
......@@ -38,6 +38,17 @@ module StubConfiguration
allow(Gitlab.config.backup).to receive_messages(to_settings(messages))
end
def stub_storage_settings(messages)
messages.each do |storage_name, storage_settings|
storage_settings['failure_count_threshold'] ||= 10
storage_settings['failure_wait_time'] ||= 30
storage_settings['failure_reset_time'] ||= 1800
storage_settings['storage_timeout'] ||= 5
end
allow(Gitlab.config.repositories).to receive(:storages).and_return(messages)
end
private
# Modifies stubbed messages to also stub possible predicate versions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment