summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorChristoph Albers <c.albers@x-ion.de>2016-12-13 16:10:58 +0100
committerJan Klare <j.klare@cloudbau.de>2016-12-20 11:45:14 +0000
commit68da464eaee248f75392b6ebd6e51701eccd8456 (patch)
tree18435fe7cdd142fcc26d728e1e5ac72bced61657 /spec
parenta52e0e8d78fd2ce76d5207f2231f2b41390a7403 (diff)
RPC_backend / transport_url workover
- removed deprecated rabbitmq attributes - added rabbit_transport_url Change-Id: I19ff8e4df8f559bf03ff746fcc49be9425edd84e Depends-On: I0a6da37e3f2b839590b6349fd906d47c5206fbb3
Notes
Notes (review): Code-Review+2: Jan Klare <j.klare@cloudbau.de> Code-Review+2: Samuel Cassiba <s@cassiba.com> Workflow+1: Samuel Cassiba <s@cassiba.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 21 Dec 2016 19:45:01 +0000 Reviewed-on: https://review.openstack.org/410259 Project: openstack/cookbook-openstack-block-storage Branch: refs/heads/master
Diffstat (limited to 'spec')
-rw-r--r--spec/cinder_common_spec.rb13
-rw-r--r--spec/spec_helper.rb3
2 files changed, 5 insertions, 11 deletions
diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb
index 8e65abf..59a0843 100644
--- a/spec/cinder_common_spec.rb
+++ b/spec/cinder_common_spec.rb
@@ -192,8 +192,8 @@ describe 'openstack-block-storage::cinder-common' do
192 expect(chef_run).to render_file(file.name).with_content(/^osapi_volume_listen_port = 8776$/) 192 expect(chef_run).to render_file(file.name).with_content(/^osapi_volume_listen_port = 8776$/)
193 end 193 end
194 end 194 end
195 it 'has default RPC/AMQP options set' do 195 it 'has default transport_url/AMQP options set' do
196 [/^rpc_backend = rabbit/].each do |line| 196 [%r{^transport_url = rabbit://guest:mypass@127.0.0.1:5672$}].each do |line|
197 expect(chef_run).to render_file(file.name).with_content(line) 197 expect(chef_run).to render_file(file.name).with_content(line)
198 end 198 end
199 end 199 end
@@ -216,15 +216,6 @@ describe 'openstack-block-storage::cinder-common' do
216 end 216 end
217 end 217 end
218 218
219 it 'has rabbit_userid' do
220 node.set['openstack']['mq']['block-storage']['rabbit']['userid'] = 'rabbit_userid_value'
221 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_userid = rabbit_userid_value$/)
222 end
223
224 it 'has rabbit_password' do
225 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_password = #{test_pass}$/)
226 end
227
228 it 'has rabbit_virtual_host' do 219 it 'has rabbit_virtual_host' do
229 node.set['openstack']['block-storage']['conf']['oslo_messaging_rabbit']['rabbit_virtual_host'] = 'vhost_value' 220 node.set['openstack']['block-storage']['conf']['oslo_messaging_rabbit']['rabbit_virtual_host'] = 'vhost_value'
230 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_virtual_host = vhost_value$/) 221 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_rabbit', /^rabbit_virtual_host = vhost_value$/)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0876859..1242590 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -58,6 +58,9 @@ shared_context 'block-storage-stubs' do
58 allow_any_instance_of(Chef::Recipe).to receive(:get_password) 58 allow_any_instance_of(Chef::Recipe).to receive(:get_password)
59 .with('user', 'ibmnas_admin') 59 .with('user', 'ibmnas_admin')
60 .and_return('test_pass') 60 .and_return('test_pass')
61 allow_any_instance_of(Chef::Recipe).to receive(:rabbit_transport_url)
62 .with('block-storage')
63 .and_return('rabbit://guest:mypass@127.0.0.1:5672')
61 allow(Chef::Application).to receive(:fatal!) 64 allow(Chef::Application).to receive(:fatal!)
62 end 65 end
63end 66end