summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMark Vanderwiel <vanderwl@us.ibm.com>2015-06-16 10:07:35 -0500
committerMark Vanderwiel <vanderwl@us.ibm.com>2015-06-16 10:08:29 -0500
commitba480c6a99c613c74a3a84ab2a6abdda205a44de (patch)
treea7352c687a7ec6e42f100e0209dd4a95508aa2f6 /spec
parent46afa0ed92817c3607b8c89f5425149a6e6a2b98 (diff)
Allow rabbit mq kombu ssl configuration
Add the rest of the kombu ssl configuration options. Change-Id: I9dc682a2a8e4df289b9c0bbca11208183d1ff71b Partial-Bug: 1464706
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Zhiwei Chen <zhiwchen@cn.ibm.com> Workflow+1: Zhiwei Chen <zhiwchen@cn.ibm.com> Code-Review+2: JJ Asghar <jj@getchef.com> Submitted-by: Jenkins Submitted-at: Wed, 17 Jun 2015 08:19:47 +0000 Reviewed-on: https://review.openstack.org/192243 Project: openstack/cookbook-openstack-block-storage Branch: refs/heads/master
Diffstat (limited to 'spec')
-rw-r--r--spec/cinder_common_spec.rb42
1 files changed, 31 insertions, 11 deletions
diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb
index c935b3c..73b4179 100644
--- a/spec/cinder_common_spec.rb
+++ b/spec/cinder_common_spec.rb
@@ -370,7 +370,9 @@ describe 'openstack-block-storage::cinder-common' do
370 it 'has default RPC/AMQP options set' do 370 it 'has default RPC/AMQP options set' do
371 [/^rpc_conn_pool_size=30$/, 371 [/^rpc_conn_pool_size=30$/,
372 /^amqp_durable_queues=false$/, 372 /^amqp_durable_queues=false$/,
373 /^amqp_auto_delete=false$/].each do |line| 373 /^amqp_auto_delete=false$/,
374 /^heartbeat_timeout_threshold=0$/,
375 /^heartbeat_rate=2$/].each do |line|
374 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line) 376 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
375 end 377 end
376 end 378 end
@@ -411,11 +413,9 @@ describe 'openstack-block-storage::cinder-common' do
411 end 413 end
412 end 414 end
413 415
414 %w(use_ssl userid).each do |attr| 416 it 'has rabbit_userid' do
415 it "has rabbit_#{attr}" do 417 node.set['openstack']['mq']['block-storage']['rabbit']['userid'] = 'rabbit_userid_value'
416 node.set['openstack']['mq']['block-storage']['rabbit'][attr] = "rabbit_#{attr}_value" 418 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_userid=rabbit_userid_value$/)
417 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_#{attr}=rabbit_#{attr}_value$/)
418 end
419 end 419 end
420 420
421 it 'has rabbit_password' do 421 it 'has rabbit_password' do
@@ -427,15 +427,35 @@ describe 'openstack-block-storage::cinder-common' do
427 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_virtual_host=vhost_value$/) 427 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_virtual_host=vhost_value$/)
428 end 428 end
429 429
430 it 'does not have kombu ssl version set' do 430 it 'does not have ssl config set' do
431 expect(chef_run).not_to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^kombu_ssl_version=TLSv1.2$/) 431 [/^rabbit_use_ssl=/,
432 /^kombu_ssl_version=/,
433 /^kombu_ssl_keyfile=/,
434 /^kombu_ssl_certfile=/,
435 /^kombu_ssl_ca_certs=/,
436 /^kombu_reconnect_delay=/,
437 /^kombu_reconnect_timeout=/].each do |line|
438 expect(chef_run).not_to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
439 end
432 end 440 end
433 441
434 it 'sets kombu ssl version' do 442 it 'sets ssl config' do
435 node.set['openstack']['mq']['block-storage']['rabbit']['use_ssl'] = true 443 node.set['openstack']['mq']['block-storage']['rabbit']['use_ssl'] = true
436 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_version'] = 'TLSv1.2' 444 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_version'] = 'TLSv1.2'
437 445 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_keyfile'] = 'keyfile'
438 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^kombu_ssl_version=TLSv1.2$/) 446 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_certfile'] = 'certfile'
447 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_ssl_ca_certs'] = 'certsfile'
448 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_reconnect_delay'] = 123.123
449 node.set['openstack']['mq']['block-storage']['rabbit']['kombu_reconnect_timeout'] = 123
450 [/^rabbit_use_ssl=true/,
451 /^kombu_ssl_version=TLSv1.2$/,
452 /^kombu_ssl_keyfile=keyfile$/,
453 /^kombu_ssl_certfile=certfile$/,
454 /^kombu_ssl_ca_certs=certsfile$/,
455 /^kombu_reconnect_delay=123.123$/,
456 /^kombu_reconnect_timeout=123$/].each do |line|
457 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', line)
458 end
439 end 459 end
440 460
441 it 'has the default rabbit_retry_interval set' do 461 it 'has the default rabbit_retry_interval set' do