puppet-keystone/spec/classes/keystone_messaging_amqp_spec.rb
ZhongShengping 3eb8b2bb15 Deprecate allow_insecure_clients option
The allow_insecure_clients has been deprecated[1].

[1]https://review.opendev.org/#/c/417629/

Change-Id: I1b1d1722bb56ed78436eaa9fd5b0c6b4718c7306
Closes-Bug: #1902158
2020-11-02 15:26:32 +08:00

65 lines
2.1 KiB
Ruby

require 'spec_helper'
describe 'keystone::messaging::amqp' do
shared_examples 'keystone messaging amqp' do
it { is_expected.to contain_class('keystone::messaging::amqp').with(
'amqp_pre_settled' => ['<SERVICE DEFAULT>'],
'amqp_idle_timeout' => '<SERVICE DEFAULT>',
'amqp_ssl_ca_file' => '<SERVICE DEFAULT>',
'amqp_ssl_cert_file' => '<SERVICE DEFAULT>',
'amqp_ssl_key_file' => '<SERVICE DEFAULT>',
'amqp_ssl_key_password' => '<SERVICE DEFAULT>',
'amqp_sasl_mechanisms' => '<SERVICE DEFAULT>',
)}
context 'with specific parameters' do
let :params do
{
:amqp_pre_settled => ['rpc-cast','rpc-reply','notify'],
:amqp_idle_timeout => '100',
:amqp_sasl_mechanisms => 'ANONYMOUS DIGEST-MD5 EXTERNAL PLAIN',
}
end
it { is_expected.to contain_class('keystone::messaging::amqp').with(
'amqp_pre_settled' => ['rpc-cast','rpc-reply','notify'],
'amqp_idle_timeout' => '100',
'amqp_sasl_mechanisms' => 'ANONYMOUS DIGEST-MD5 EXTERNAL PLAIN',
)}
end
context 'with AMQP 1.0 communication SSLed' do
let :params do
{
:amqp_ssl_ca_file => '/path/to/ssl/ca/certs',
:amqp_ssl_cert_file => '/path/to/ssl/cert/file',
:amqp_ssl_key_file => '/path/to/ssl/keyfile',
:amqp_ssl_key_password => '/path/to/ssl/pw_file',
}
end
it { is_expected.to contain_class('keystone::messaging::amqp').with(
'amqp_ssl_ca_file' => '/path/to/ssl/ca/certs',
'amqp_ssl_cert_file' => '/path/to/ssl/cert/file',
'amqp_ssl_key_file' => '/path/to/ssl/keyfile',
'amqp_ssl_key_password' => '/path/to/ssl/pw_file',
)}
end
end
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_behaves_like 'keystone messaging amqp'
end
end
end