puppet-cinder/spec/classes/cinder_api_spec.rb
Derek Higgins cde157b822 Set hasstatus => true for cinder services
Fix bug 1170705

notifies to cinder services on RHEL were not causing a restart of the service

Change-Id: I2fa06695acd068d14ff5a13de08538cf992f9005
2013-04-19 09:42:30 -04:00

69 lines
1.9 KiB
Ruby

require 'spec_helper'
describe 'cinder::api' do
let :req_params do
{:keystone_password => 'foo'}
end
let :facts do
{:osfamily => 'Debian'}
end
describe 'with only required params' do
let :params do
req_params
end
it { should contain_service('cinder-api').with(
'hasstatus' => 'true'
)}
it 'should configure cinder api correctly' do
should contain_cinder_config('DEFAULT/auth_strategy').with(
:value => 'keystone'
)
should contain_cinder_config('DEFAULT/bind_host').with(
:value => '0.0.0.0'
)
should contain_cinder_api_paste_ini('filter:authtoken/service_protocol').with(
:value => 'http'
)
should contain_cinder_api_paste_ini('filter:authtoken/service_host').with(
:value => 'localhost'
)
should contain_cinder_api_paste_ini('filter:authtoken/service_port').with(
:value => '5000'
)
should contain_cinder_api_paste_ini('filter:authtoken/auth_protocol').with(
:value => 'http'
)
should contain_cinder_api_paste_ini('filter:authtoken/auth_host').with(
:value => 'localhost'
)
should contain_cinder_api_paste_ini('filter:authtoken/auth_port').with(
:value => '35357'
)
should contain_cinder_api_paste_ini('filter:authtoken/admin_tenant_name').with(
:value => 'services'
)
should contain_cinder_api_paste_ini('filter:authtoken/admin_user').with(
:value => 'cinder'
)
should contain_cinder_api_paste_ini('filter:authtoken/admin_password').with(
:value => 'foo'
)
end
end
describe 'with only required params' do
let :params do
req_params.merge({'bind_host' => '192.168.1.3'})
end
it 'should configure cinder api correctly' do
should contain_cinder_config('DEFAULT/bind_host').with(
:value => '192.168.1.3'
)
end
end
end