2014-12-30 19:23:11 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'heat::db::postgresql' do
|
2016-04-30 10:22:30 +08:00
|
|
|
shared_examples_for 'heat::db::postgresql' do
|
|
|
|
let :req_params do
|
|
|
|
{ :password => 'pw' }
|
|
|
|
end
|
2014-12-30 19:23:11 +01:00
|
|
|
|
2016-04-30 10:22:30 +08:00
|
|
|
let :pre_condition do
|
2019-12-08 23:07:36 +01:00
|
|
|
"include postgresql::server
|
|
|
|
class { 'heat::keystone::authtoken':
|
2016-08-23 22:51:13 -03:00
|
|
|
password => 'password',
|
|
|
|
}
|
2019-12-08 23:07:36 +01:00
|
|
|
include heat"
|
2014-12-30 19:23:11 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
2015-02-25 04:08:10 +01:00
|
|
|
it { is_expected.to contain_postgresql__server__db('heat').with(
|
2014-12-30 19:23:11 +01:00
|
|
|
:user => 'heat',
|
|
|
|
:password => 'md5fd5c4fca491370aab732f903e2fb7c99'
|
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-04-30 10:22:30 +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({
|
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
}))
|
2014-12-30 19:23:11 +01:00
|
|
|
end
|
|
|
|
|
2016-11-11 13:11:39 +02:00
|
|
|
it_behaves_like 'heat::db::postgresql'
|
2014-12-30 19:23:11 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|