Allow rabbit mq kombu ssl configuration
Add the rest of the kombu ssl configuration options. Change-Id: I9dc682a2a8e4df289b9c0bbca11208183d1ff71b Partial-Bug: 1464706
This commit is contained in:
@@ -370,7 +370,9 @@ describe 'openstack-block-storage::cinder-common' do
|
||||
it 'has default RPC/AMQP options set' do
|
||||
[/^rpc_conn_pool_size=30$/,
|
||||
/^amqp_durable_queues=false$/,
|
||||
/^amqp_auto_delete=false$/].each do |line|
|
||||
/^amqp_auto_delete=false$/,
|
||||
/^heartbeat_timeout_threshold=0$/,
|
||||
/^heartbeat_rate=2$/].each do |line|
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
|
||||
end
|
||||
end
|
||||
@@ -411,11 +413,9 @@ describe 'openstack-block-storage::cinder-common' do
|
||||
end
|
||||
end
|
||||
|
||||
%w(use_ssl userid).each do |attr|
|
||||
it "has rabbit_#{attr}" do
|
||||
node.set['openstack']['mq']['block-storage']['rabbit'][attr] = "rabbit_#{attr}_value"
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_#{attr}=rabbit_#{attr}_value$/)
|
||||
end
|
||||
it 'has rabbit_userid' do
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['userid'] = 'rabbit_userid_value'
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_userid=rabbit_userid_value$/)
|
||||
end
|
||||
|
||||
it 'has rabbit_password' do
|
||||
@@ -427,15 +427,35 @@ describe 'openstack-block-storage::cinder-common' do
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_virtual_host=vhost_value$/)
|
||||
end
|
||||
|
||||
it 'does not have kombu ssl version set' do
|
||||
expect(chef_run).not_to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^kombu_ssl_version=TLSv1.2$/)
|
||||
it 'does not have ssl config set' do
|
||||
[/^rabbit_use_ssl=/,
|
||||
/^kombu_ssl_version=/,
|
||||
/^kombu_ssl_keyfile=/,
|
||||
/^kombu_ssl_certfile=/,
|
||||
/^kombu_ssl_ca_certs=/,
|
||||
/^kombu_reconnect_delay=/,
|
||||
/^kombu_reconnect_timeout=/].each do |line|
|
||||
expect(chef_run).not_to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
|
||||
end
|
||||
end
|
||||
|
||||
it 'sets kombu ssl version' do
|
||||
it 'sets ssl config' do
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['use_ssl'] = true
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_version'] = 'TLSv1.2'
|
||||
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^kombu_ssl_version=TLSv1.2$/)
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_keyfile'] = 'keyfile'
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_certfile'] = 'certfile'
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_ca_certs'] = 'certsfile'
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['kombu_reconnect_delay'] = 123.123
|
||||
node.set['openstack']['mq']['block-storage']['rabbit']['kombu_reconnect_timeout'] = 123
|
||||
[/^rabbit_use_ssl=true/,
|
||||
/^kombu_ssl_version=TLSv1.2$/,
|
||||
/^kombu_ssl_keyfile=keyfile$/,
|
||||
/^kombu_ssl_certfile=certfile$/,
|
||||
/^kombu_ssl_ca_certs=certsfile$/,
|
||||
/^kombu_reconnect_delay=123.123$/,
|
||||
/^kombu_reconnect_timeout=123$/].each do |line|
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
|
||||
end
|
||||
end
|
||||
|
||||
it 'has the default rabbit_retry_interval set' do
|
||||
|
||||
Reference in New Issue
Block a user