puppet-zaqar/spec/classes/zaqar_management_sqlalchemy_spec.rb
Thomas Herve 889be10904 Add support for the swift backend
This adds support for running swift as the messaging backend of Zaqar,
and SQLAlchemy as the management backend.

Change-Id: I448d303d01e33a0d89625d7ff442b652838d9c36
2017-02-14 14:18:10 +01:00

52 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'zaqar::management::sqlalchemy' do
shared_examples_for 'zaqar::management::sqlalchemy' do
let :pre_condition do
"class { '::zaqar::keystone::authtoken':
password =>'foo',
}
class { '::zaqar':
management_store =>'sqlalchemy',
}"
end
let :req_params do
{
:uri => 'mysql://user:pass@127.0.0.1/zaqar',
}
end
describe 'with only required params' do
let :params do
req_params
end
it 'should config sqlalchemy management driver' do
is_expected.to contain_zaqar_config('drivers/management_store').with(
:value => 'sqlalchemy'
)
is_expected.to contain_zaqar_config('drivers:management_store:sqlalchemy/uri').with(
:value => 'mysql://user:pass@127.0.0.1/zaqar',
)
end
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it_configures 'zaqar::management::sqlalchemy'
end
end
end