From 2ca1619677f72513e887fa6d6b317ae2f0526934 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 22 Mar 2022 18:46:00 +0900 Subject: [PATCH] Do not hard-code default of [api] max_limit ... because the current default value is same as the service default. Change-Id: I5208f5be47d20c55afa3c3f2aebd2787939ccd26 --- manifests/api.pp | 4 ++-- spec/classes/gnocchi_api_spec.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index 11e8b36b..cbf06ed4 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -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', diff --git a/spec/classes/gnocchi_api_spec.rb b/spec/classes/gnocchi_api_spec.rb index 9e83dcbb..44e86fa0 100644 --- a/spec/classes/gnocchi_api_spec.rb +++ b/spec/classes/gnocchi_api_spec.rb @@ -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('') is_expected.to contain_gnocchi_config('api/auth_mode').with_value('keystone') is_expected.to contain_gnocchi_config('api/paste_config').with_value('') is_expected.to contain_gnocchi_config('api/operation_timeout').with_value('') @@ -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