2014-02-10 12:02:40 +08:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'swift::proxy::gatekeeper' do
|
|
|
|
|
|
|
|
let :facts do
|
2014-08-12 16:59:04 +02:00
|
|
|
{}
|
2014-02-10 12:02:40 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "when using default parameters" do
|
2016-09-28 18:25:24 +00:00
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/use').with_value('egg:swift#gatekeeper') }
|
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_name').with_value('gatekeeper') }
|
2017-04-25 10:24:21 +02:00
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_facility').with_value('LOG_LOCAL2') }
|
2016-09-28 18:25:24 +00:00
|
|
|
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_address').with_value('/dev/log') }
|
2014-02-10 12:02:40 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
describe "when overriding default parameters" do
|
|
|
|
let :params do
|
|
|
|
{
|
|
|
|
:log_name => 'newgatekeeper',
|
2017-04-25 10:24:21 +02:00
|
|
|
:log_facility => 'LOG_LOCAL3',
|
2014-02-10 12:02:40 +08:00
|
|
|
:log_level => 'WARN',
|
|
|
|
}
|
|
|
|
end
|
2016-09-28 18:25:24 +00:00
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_name').with_value('newgatekeeper') }
|
2017-04-25 10:24:21 +02:00
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_facility').with_value('LOG_LOCAL3') }
|
2016-09-28 18:25:24 +00:00
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:gatekeeper/set log_level').with_value('WARN') }
|
2014-02-10 12:02:40 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|