Remove redundant hardcoded default of log_headers
The log_headers option defaults to no (which is effectively same as False), so we don't have to explicitly set this option. Change-Id: I0463331018dd1ff844caf0bc54f9abfe4627420e
This commit is contained in:
parent
300802a79d
commit
f0a77d2cc2
|
@ -36,7 +36,7 @@
|
||||||
#
|
#
|
||||||
# [*log_headers*]
|
# [*log_headers*]
|
||||||
# (optional) If True, log headers in each request
|
# (optional) If True, log headers in each request
|
||||||
# Defaults to False.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*log_udp_host*]
|
# [*log_udp_host*]
|
||||||
# (optional) If not set, the UDP receiver for syslog is disabled.
|
# (optional) If not set, the UDP receiver for syslog is disabled.
|
||||||
|
@ -159,7 +159,7 @@ class swift::proxy(
|
||||||
$workers = $facts['os_workers'],
|
$workers = $facts['os_workers'],
|
||||||
Boolean $allow_account_management = true,
|
Boolean $allow_account_management = true,
|
||||||
Boolean $account_autocreate = true,
|
Boolean $account_autocreate = true,
|
||||||
$log_headers = 'False',
|
$log_headers = $facts['os_service_default'],
|
||||||
$log_udp_host = $facts['os_service_default'],
|
$log_udp_host = $facts['os_service_default'],
|
||||||
$log_udp_port = $facts['os_service_default'],
|
$log_udp_port = $facts['os_service_default'],
|
||||||
$log_address = '/dev/log',
|
$log_address = '/dev/log',
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#
|
#
|
||||||
# [*log_headers*]
|
# [*log_headers*]
|
||||||
# (Optional) The log headers of gatekeeper.
|
# (Optional) The log headers of gatekeeper.
|
||||||
# Defaults to false.
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*log_address*]
|
# [*log_address*]
|
||||||
# (Optional) The log address of gatekeeper.
|
# (Optional) The log address of gatekeeper.
|
||||||
|
@ -51,7 +51,7 @@ class swift::proxy::gatekeeper(
|
||||||
$log_name = 'gatekeeper',
|
$log_name = 'gatekeeper',
|
||||||
$log_facility = 'LOG_LOCAL2',
|
$log_facility = 'LOG_LOCAL2',
|
||||||
$log_level = 'INFO',
|
$log_level = 'INFO',
|
||||||
$log_headers = false,
|
$log_headers = $facts['os_service_default'],
|
||||||
$log_address = '/dev/log'
|
$log_address = '/dev/log'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe 'swift::proxy::gatekeeper' do
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_name').with_value('gatekeeper') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_name').with_value('gatekeeper') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_facility').with_value('LOG_LOCAL2') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_facility').with_value('LOG_LOCAL2') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_level').with_value('INFO') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_level').with_value('INFO') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_headers').with_value('false') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_headers').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_address').with_value('/dev/log') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_address').with_value('/dev/log') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ describe 'swift::proxy::gatekeeper' do
|
||||||
:shunt_inbound_x_timestamp => true,
|
:shunt_inbound_x_timestamp => true,
|
||||||
:allow_reserved_names_header => false,
|
:allow_reserved_names_header => false,
|
||||||
:log_name => 'newgatekeeper',
|
:log_name => 'newgatekeeper',
|
||||||
|
:log_headers => false,
|
||||||
:log_facility => 'LOG_LOCAL3',
|
:log_facility => 'LOG_LOCAL3',
|
||||||
:log_level => 'WARN',
|
:log_level => 'WARN',
|
||||||
}
|
}
|
||||||
|
@ -29,6 +30,7 @@ describe 'swift::proxy::gatekeeper' do
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_name').with_value('newgatekeeper') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_name').with_value('newgatekeeper') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_facility').with_value('LOG_LOCAL3') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_facility').with_value('LOG_LOCAL3') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_level').with_value('WARN') }
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_level').with_value('WARN') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_headers').with_value(false) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ describe 'swift::proxy' do
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_name').with_value('proxy-server') }
|
it { should contain_swift_proxy_config('DEFAULT/log_name').with_value('proxy-server') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_facility').with_value('LOG_LOCAL2') }
|
it { should contain_swift_proxy_config('DEFAULT/log_facility').with_value('LOG_LOCAL2') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_level').with_value('INFO') }
|
it { should contain_swift_proxy_config('DEFAULT/log_level').with_value('INFO') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_headers').with_value('False') }
|
it { should contain_swift_proxy_config('DEFAULT/log_headers').with_value('<SERVICE DEFAULT>') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_udp_host').with_value('<SERVICE DEFAULT>') }
|
it { should contain_swift_proxy_config('DEFAULT/log_udp_host').with_value('<SERVICE DEFAULT>') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_udp_port').with_value('<SERVICE DEFAULT>') }
|
it { should contain_swift_proxy_config('DEFAULT/log_udp_port').with_value('<SERVICE DEFAULT>') }
|
||||||
|
@ -126,6 +126,7 @@ describe 'swift::proxy' do
|
||||||
:allow_account_management => false,
|
:allow_account_management => false,
|
||||||
:account_autocreate => false,
|
:account_autocreate => false,
|
||||||
:log_level => 'DEBUG',
|
:log_level => 'DEBUG',
|
||||||
|
:log_headers => false,
|
||||||
:log_name => 'swift-proxy-server',
|
:log_name => 'swift-proxy-server',
|
||||||
:object_chunk_size => '8192',
|
:object_chunk_size => '8192',
|
||||||
:client_chunk_size => '8192',
|
:client_chunk_size => '8192',
|
||||||
|
@ -148,7 +149,7 @@ describe 'swift::proxy' do
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_name').with_value('swift-proxy-server') }
|
it { should contain_swift_proxy_config('DEFAULT/log_name').with_value('swift-proxy-server') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_facility').with_value('LOG_LOCAL2') }
|
it { should contain_swift_proxy_config('DEFAULT/log_facility').with_value('LOG_LOCAL2') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_level').with_value('DEBUG') }
|
it { should contain_swift_proxy_config('DEFAULT/log_level').with_value('DEBUG') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_headers').with_value('False') }
|
it { should contain_swift_proxy_config('DEFAULT/log_headers').with_value(false) }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/cors_allow_origin').with_value('http://foo.bar:1234,https://foo.bar') }
|
it { should contain_swift_proxy_config('DEFAULT/cors_allow_origin').with_value('http://foo.bar:1234,https://foo.bar') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/strict_cors_mode').with_value('true') }
|
it { should contain_swift_proxy_config('DEFAULT/strict_cors_mode').with_value('true') }
|
||||||
|
@ -211,7 +212,7 @@ describe 'swift::proxy' do
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_name').with_value('swift-proxy-server') }
|
it { should contain_swift_proxy_config('DEFAULT/log_name').with_value('swift-proxy-server') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_facility').with_value('LOG_LOCAL2') }
|
it { should contain_swift_proxy_config('DEFAULT/log_facility').with_value('LOG_LOCAL2') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_level').with_value('DEBUG') }
|
it { should contain_swift_proxy_config('DEFAULT/log_level').with_value('DEBUG') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_headers').with_value('False') }
|
it { should contain_swift_proxy_config('DEFAULT/log_headers').with_value('<SERVICE DEFAULT>') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_udp_host').with_value('127.0.0.1') }
|
it { should contain_swift_proxy_config('DEFAULT/log_udp_host').with_value('127.0.0.1') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/log_udp_port').with_value('514') }
|
it { should contain_swift_proxy_config('DEFAULT/log_udp_port').with_value('514') }
|
||||||
|
|
Loading…
Reference in New Issue