
Previsouly the openstack module would use the verbose parameter for debug logging. This change adds the debug parameter that allows users to seperate debug and verbose logging levels. Defauls to false for backwards compatibility and to disable debug logging. Change-Id: I0eef4d0c7729df8ad0a7103f3f032d6c7da9def7
63 lines
1.9 KiB
Ruby
63 lines
1.9 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'openstack::cinder::controller' do
|
|
|
|
let :params do
|
|
{
|
|
:db_password => 'db_password',
|
|
:rabbit_password => 'rabpass',
|
|
:keystone_password => 'user_pass'
|
|
}
|
|
end
|
|
|
|
let :facts do
|
|
{ :osfamily => 'Redhat' }
|
|
end
|
|
|
|
it 'should configure using the default values' do
|
|
should contain_class('cinder').with(
|
|
:sql_connection => "mysql://cinder:#{params[:db_password]}@127.0.0.1/cinder?charset=utf8",
|
|
:rpc_backend => 'cinder.openstack.common.rpc.impl_kombu',
|
|
:rabbit_userid => 'guest',
|
|
:rabbit_password => params[:rabbit_password],
|
|
:rabbit_host => '127.0.0.1',
|
|
:rabbit_port => '5672',
|
|
:rabbit_hosts => false,
|
|
:rabbit_virtual_host => '/',
|
|
:package_ensure => 'present',
|
|
:api_paste_config => '/etc/cinder/api-paste.ini',
|
|
:debug => false,
|
|
:verbose => false
|
|
)
|
|
should contain_class('cinder::api').with(
|
|
:keystone_password => params[:keystone_password],
|
|
:keystone_enabled => true,
|
|
:keystone_user => 'cinder',
|
|
:keystone_auth_host => 'localhost',
|
|
:keystone_auth_port => '35357',
|
|
:keystone_auth_protocol => 'http',
|
|
:service_port => '5000',
|
|
:package_ensure => 'present',
|
|
:bind_host => '0.0.0.0',
|
|
:enabled => true
|
|
)
|
|
should contain_class('cinder::scheduler').with(
|
|
:scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler',
|
|
:package_ensure => 'present',
|
|
:enabled => true
|
|
)
|
|
end
|
|
|
|
context 'with unsupported db type' do
|
|
|
|
before do
|
|
params.merge!({:db_type => 'sqlite'})
|
|
end
|
|
|
|
it do
|
|
expect { subject }.to raise_error(Puppet::Error, /Unsupported db_type sqlite/)
|
|
end
|
|
end
|
|
|
|
end
|