2015-08-05 07:43:24 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'mistral::db::postgresql' do
|
|
|
|
|
2016-04-30 11:34:53 +08:00
|
|
|
shared_examples_for 'mistral::db::postgresql' do
|
|
|
|
let :req_params do
|
2020-05-19 20:21:41 +09:00
|
|
|
{ :password => 'mistralpass' }
|
2016-04-30 11:34:53 +08:00
|
|
|
end
|
2015-08-05 07:43:24 +00:00
|
|
|
|
2016-04-30 11:34:53 +08:00
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
2015-08-05 07:43:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
2020-10-10 09:31:12 +08:00
|
|
|
it { is_expected.to contain_class('mistral::deps') }
|
|
|
|
|
2020-05-19 20:21:41 +09:00
|
|
|
it { is_expected.to contain_openstacklib__db__postgresql('mistral').with(
|
|
|
|
:user => 'mistral',
|
|
|
|
:password => 'mistralpass',
|
|
|
|
:dbname => 'mistral',
|
|
|
|
:encoding => nil,
|
|
|
|
:privileges => 'ALL',
|
2015-08-05 07:43:24 +00:00
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-04-30 11:34:53 +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({
|
2022-07-24 00:47:29 +09:00
|
|
|
# puppet-postgresql requires the service_provider fact provided by
|
|
|
|
# puppetlabs-postgresql.
|
|
|
|
:service_provider => 'systemd'
|
2016-04-30 11:34:53 +08:00
|
|
|
}))
|
2015-08-05 07:43:24 +00:00
|
|
|
end
|
|
|
|
|
2022-07-24 00:47:29 +09:00
|
|
|
it_configures 'mistral::db::postgresql'
|
2015-08-05 07:43:24 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|