2015-10-01 08:12:28 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'barbican::db::postgresql' do
|
|
|
|
|
2016-04-30 09:27:58 +08:00
|
|
|
shared_examples_for 'barbican::db::postgresql' do
|
|
|
|
let :req_params do
|
|
|
|
{ :password => 'pw' }
|
|
|
|
end
|
2015-10-01 08:12:28 -04:00
|
|
|
|
2016-04-30 09:27:58 +08:00
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
2015-10-01 08:12:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
|
|
|
it { is_expected.to contain_postgresql__server__db('barbican').with(
|
|
|
|
:user => 'barbican',
|
|
|
|
:password => 'md5699e09b3c7579f59869b882716fd7299'
|
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-04-30 09:27:58 +08:00
|
|
|
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'
|
|
|
|
}))
|
2015-10-01 08:12:28 -04:00
|
|
|
end
|
|
|
|
|
2016-04-30 09:27:58 +08:00
|
|
|
it_configures 'barbican::db::postgresql'
|
2015-10-01 08:12:28 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|