Commit 282db545 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'sh-fix-ee-issue-7543' into 'master'

Add stub methods for FakeApplicationSetting

Closes gitlab-ee#7543

See merge request gitlab-org/gitlab-ce!21662
parents 2f990e34 70799b05
......@@ -5,16 +5,6 @@
# column type without parsing db/schema.rb.
module Gitlab
class FakeApplicationSettings < OpenStruct
def initialize(options = {})
super
FakeApplicationSettings.define_predicate_methods(options)
end
def pick_repository_storage
repository_storages.sample
end
# Mimic ActiveRecord predicate methods for boolean values
def self.define_predicate_methods(options)
options.each do |key, value|
......@@ -27,5 +17,23 @@ module Gitlab
end
end
end
def initialize(options = {})
super
FakeApplicationSettings.define_predicate_methods(options)
end
def key_restriction_for(type)
0
end
def allowed_key_types
ApplicationSetting::SUPPORTED_KEY_TYPES
end
def pick_repository_storage
repository_storages.sample
end
end
end
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