Merge "Do not hard-code default of [api] max_limit"

This commit is contained in:
Zuul 2022-03-26 14:39:38 +00:00 committed by Gerrit Code Review
commit 98cb98936f
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@
# [*max_limit*]
# (optional) The maximum number of items returned in a
# single response from a collection resource.
# Defaults to 1000
# Defaults to $::os_service_default
#
# [*package_ensure*]
# (optional) ensure state for package.
@ -65,7 +65,7 @@ class gnocchi::api (
$manage_service = true,
$enabled = true,
$package_ensure = 'present',
$max_limit = 1000,
$max_limit = $::os_service_default,
$service_name = $::gnocchi::params::api_service_name,
$sync_db = false,
$auth_strategy = 'keystone',

View File

@ -57,7 +57,7 @@ describe 'gnocchi::api' do
end
it 'configures gnocchi-api' do
is_expected.to contain_gnocchi_config('api/max_limit').with_value(1000)
is_expected.to contain_gnocchi_config('api/max_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_gnocchi_config('api/auth_mode').with_value('keystone')
is_expected.to contain_gnocchi_config('api/paste_config').with_value('<SERVICE DEFAULT>')
is_expected.to contain_gnocchi_config('api/operation_timeout').with_value('<SERVICE DEFAULT>')
@ -151,10 +151,10 @@ describe 'gnocchi::api' do
context 'with max_limit' do
before do
params.merge!({:max_limit => 1001 })
params.merge!({:max_limit => 1000 })
end
it { is_expected.to contain_gnocchi_config('api/max_limit').with_value(1001) }
it { is_expected.to contain_gnocchi_config('api/max_limit').with_value(1000) }
end
context 'with paste_config' do