2014-07-02 12:29:09 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'trove::db::postgresql' do
|
|
|
|
|
2016-04-30 12:01:24 +08:00
|
|
|
shared_examples_for 'trove::db::postgresql' do
|
|
|
|
let :req_params do
|
|
|
|
{ :password => 'pw' }
|
|
|
|
end
|
2014-07-02 12:29:09 +02:00
|
|
|
|
2016-04-30 12:01:24 +08:00
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
2014-07-02 12:29:09 +02:00
|
|
|
end
|
2014-12-30 22:26:48 +01:00
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
|
|
|
it { is_expected.to contain_postgresql__server__db('trove').with(
|
|
|
|
:user => 'trove',
|
|
|
|
:password => 'md5e12ef276d200761a0808f17a5b076451'
|
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-04-30 12:01:24 +08:00
|
|
|
on_supported_os({
|
|
|
|
:supported_os => OSDefaults.get_supported_os
|
|
|
|
}).each do |os,facts|
|
|
|
|
context "on #{os}" do
|
|
|
|
let (:facts) do
|
2016-10-25 09:51:35 -06:00
|
|
|
facts.merge(OSDefaults.get_facts())
|
2014-12-30 22:26:48 +01:00
|
|
|
end
|
|
|
|
|
2016-04-30 12:01:24 +08:00
|
|
|
it_configures 'trove::db::postgresql'
|
2014-12-30 22:26:48 +01:00
|
|
|
end
|
2014-07-02 12:29:09 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|