From 1d0ba466e601f17116503eb942a245a8b0e44795 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Fri, 10 Mar 2017 13:47:48 +0200 Subject: [PATCH] rabbitmq SSL: check puppet resource instead of actual config The configuration is done via the oslo::messaging::rabbit resource from puppet-oslo. We should be checking for the resource that we're using instead of the underlying configuration file. Change-Id: I60cc9bbe655d8dc7d08dd7a0d6466c7774b8f5a8 --- spec/classes/swift_proxy_ceilometer_spec.rb | 26 +++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/spec/classes/swift_proxy_ceilometer_spec.rb b/spec/classes/swift_proxy_ceilometer_spec.rb index 6c70d00d..afdd0518 100644 --- a/spec/classes/swift_proxy_ceilometer_spec.rb +++ b/spec/classes/swift_proxy_ceilometer_spec.rb @@ -65,13 +65,13 @@ describe 'swift::proxy::ceilometer' do it { is_expected.to contain_swift_proxy_config('filter:ceilometer/url').with_value('rabbit://user:pass@host:1234/virt').with_secret(true) } end - context 'with default SSL values' do - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('') } - end + it { is_expected.to contain_oslo__messaging__rabbit('swift_proxy_config').with( + :rabbit_use_ssl => '', + :kombu_ssl_ca_certs => '', + :kombu_ssl_certfile => '', + :kombu_ssl_keyfile => '', + :kombu_ssl_version => '', + )} context 'with overriden rabbit ssl params' do before do @@ -85,11 +85,13 @@ describe 'swift::proxy::ceilometer' do }) end - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('/etc/ca.cert') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('/etc/certfile') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('/etc/key') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('true') } - it { is_expected.to contain_swift_proxy_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1') } + it { is_expected.to contain_oslo__messaging__rabbit('swift_proxy_config').with( + :rabbit_use_ssl => true, + :kombu_ssl_ca_certs => '/etc/ca.cert', + :kombu_ssl_certfile => '/etc/certfile', + :kombu_ssl_keyfile => '/etc/key', + :kombu_ssl_version => 'TLSv1', + )} end end