2013-04-23 12:09:49 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'glance::db::postgresql' do
|
|
|
|
|
|
|
|
let :req_params do
|
2014-12-30 19:05:14 +01:00
|
|
|
{ :password => 'pw' }
|
2013-04-23 12:09:49 -04:00
|
|
|
end
|
|
|
|
|
2014-12-30 19:05:14 +01:00
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
2013-04-23 12:09:49 -04:00
|
|
|
end
|
|
|
|
|
2014-12-30 19:05:14 +01:00
|
|
|
context 'on a RedHat osfamily' do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:osfamily => 'RedHat',
|
|
|
|
:operatingsystemrelease => '7.0',
|
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
}
|
2013-04-23 12:09:49 -04:00
|
|
|
end
|
2014-12-30 19:05:14 +01:00
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
2015-02-25 05:37:44 +01:00
|
|
|
it { is_expected.to contain_postgresql__server__db('glance').with(
|
2014-12-30 19:05:14 +01:00
|
|
|
:user => 'glance',
|
|
|
|
:password => 'md56c7c03b193c2c1e0667bc5bd891703db'
|
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'on a Debian osfamily' do
|
|
|
|
let :facts do
|
|
|
|
{
|
|
|
|
:operatingsystemrelease => '7.8',
|
|
|
|
:operatingsystem => 'Debian',
|
|
|
|
:osfamily => 'Debian',
|
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
2015-02-25 05:37:44 +01:00
|
|
|
it { is_expected.to contain_postgresql__server__db('glance').with(
|
2014-12-30 19:05:14 +01:00
|
|
|
:user => 'glance',
|
|
|
|
:password => 'md56c7c03b193c2c1e0667bc5bd891703db'
|
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
2013-04-23 12:09:49 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|