puppet-zaqar/spec/classes/zaqar_management_sqlalchemy_spec.rb
Tobias Urdin ce76a91f62 Convert all class usage to relative names
Change-Id: Ieb9a1d2c1dcef360ca7a323fe4f6cdbb61feecfe
2019-12-08 23:26:05 +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