Merge "Stop hard-coding default of [api] port"

This commit is contained in:
Zuul 2022-08-15 15:45:07 +00:00 committed by Gerrit Code Review
commit 691e4943b6
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@
#
# [*port*]
# (Optional) The port on which the watcher API will listen.
# Defaults to 9322.
# Defaults to $::os_service_default.
#
# [*max_limit*]
# (Optional)The maximum number of items returned in a single response from a
@ -168,7 +168,7 @@ class watcher::api (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$port = 9322,
$port = $::os_service_default,
$max_limit = $::os_service_default,
$bind_host = $::os_service_default,
$workers = $::os_workers,

View File

@ -50,7 +50,7 @@ describe 'watcher::api' do
context 'with default api configuration' do
it 'should configure the api configurations section when enabled' do
is_expected.to contain_watcher_config('api/port').with_value(9322)
is_expected.to contain_watcher_config('api/port').with_value('<SERVICE DEFAULT>')
is_expected.to contain_watcher_config('api/max_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_watcher_config('api/host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_watcher_config('api/workers').with_value(2)