puppet-neutron/spec/classes/neutron_db_postgresql_spec.rb
ZhongShengping 56d2a46738 Test multiple operating systems for db
This change updates the tests for neutron::db::postgresql and
neutron::db::sync to test multiple operating systems.

Change-Id: Ifcde1fc25f8111655a1f50ac1e30b1d52bb3b1ce
2016-04-30 12:39:06 +08:00

49 lines
1022 B
Ruby

require 'spec_helper'
describe 'neutron::db::postgresql' do
shared_examples_for 'neutron::db::postgresql' do
let :req_params do
{ :password => 'pw' }
end
let :pre_condition do
'include postgresql::server'
end
let :test_facts do
{ :operatingsystem => 'default',
:operatingsystemrelease => 'default'
}
end
context 'with only required parameters' do
let :params do
req_params
end
it { is_expected.to contain_postgresql__server__db('neutron').with(
:user => 'neutron',
:password => 'md5696acd1dd66513a556a18a1beccd03d1'
)}
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({
:processorcount => 8,
:concat_basedir => '/var/lib/puppet/concat'
}))
end
it_configures 'neutron::db::postgresql'
end
end
end