2016-05-31 11:37:25 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'watcher::db::postgresql' do
|
|
|
|
|
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
|
|
|
end
|
|
|
|
|
|
|
|
let :required_params do
|
2020-05-20 08:35:22 +09:00
|
|
|
{ :password => 'watcherpass' }
|
2016-05-31 11:37:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
shared_examples_for 'watcher-db-postgresql' do
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
required_params
|
|
|
|
end
|
|
|
|
|
2020-05-20 08:35:22 +09:00
|
|
|
it { is_expected.to contain_openstacklib__db__postgresql('watcher').with(
|
|
|
|
:user => 'watcher',
|
|
|
|
:password => 'watcherpass',
|
|
|
|
:dbname => 'watcher',
|
|
|
|
:encoding => nil,
|
|
|
|
:privileges => 'ALL',
|
2016-05-31 11:37:25 +00:00
|
|
|
)}
|
|
|
|
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({ :concat_basedir => '/var/lib/puppet/concat' }))
|
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'watcher-db-postgresql'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|