2014-07-02 12:29:09 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'trove::db::postgresql' do
|
|
|
|
|
|
|
|
let :req_params do
|
2014-12-30 22:26:48 +01:00
|
|
|
{ :password => 'pw' }
|
2014-07-02 12:29:09 +02:00
|
|
|
end
|
|
|
|
|
2014-12-30 22:26:48 +01: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 'on a RedHat osfamily' do
|
|
|
|
let :facts do
|
2015-11-06 09:42:39 +01:00
|
|
|
@default_facts.merge({
|
|
|
|
:osfamily => 'RedHat',
|
|
|
|
:operatingsystemrelease => '7.0',
|
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
})
|
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
|
|
|
|
|
|
|
|
context 'on a Debian osfamily' do
|
|
|
|
let :facts do
|
2015-11-06 09:42:39 +01:00
|
|
|
@default_facts.merge({
|
2014-12-30 22:26:48 +01:00
|
|
|
:operatingsystemrelease => '7.8',
|
|
|
|
:operatingsystem => 'Debian',
|
|
|
|
:osfamily => 'Debian',
|
2015-11-06 09:42:39 +01:00
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
})
|
2014-12-30 22:26:48 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2014-07-02 12:29:09 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|