2017-12-04 16:20:27 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'swift::proxy::encryption' do
|
2018-05-17 00:13:44 +02:00
|
|
|
shared_examples 'swift::proxy::encryption' do
|
|
|
|
describe "when using default parameters" do
|
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:encryption/use').with_value('egg:swift#encryption') }
|
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:encryption/disable_encryption').with_value('false') }
|
|
|
|
end
|
2017-12-04 16:20:27 -05:00
|
|
|
|
2018-05-17 00:13:44 +02:00
|
|
|
describe "when overriding default parameters" do
|
|
|
|
let :params do
|
|
|
|
{
|
|
|
|
:disable_encryption => true,
|
|
|
|
}
|
|
|
|
end
|
2017-12-04 16:20:27 -05:00
|
|
|
|
2018-05-17 00:13:44 +02:00
|
|
|
it { is_expected.to contain_swift_proxy_config('filter:encryption/disable_encryption').with_value('true') }
|
|
|
|
end
|
2017-12-04 16:20:27 -05:00
|
|
|
end
|
|
|
|
|
2018-05-17 00:13:44 +02:00
|
|
|
on_supported_os({
|
|
|
|
:supported_os => OSDefaults.get_supported_os
|
|
|
|
}).each do |os,facts|
|
|
|
|
context "on #{os}" do
|
|
|
|
let (:facts) do
|
|
|
|
facts.merge(OSDefaults.get_facts())
|
|
|
|
end
|
|
|
|
|
|
|
|
it_configures 'swift::proxy::encryption'
|
2017-12-04 16:20:27 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|