2016-01-29 17:39:33 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'nova::db::postgresql_api' do
|
|
|
|
|
2016-04-30 11:49:23 +08:00
|
|
|
shared_examples_for 'nova::db::postgresql' do
|
|
|
|
let :req_params do
|
2020-05-17 09:21:48 +09:00
|
|
|
{ :password => 'novapass' }
|
2016-04-30 11:49:23 +08:00
|
|
|
end
|
2016-01-29 17:39:33 -05:00
|
|
|
|
2016-04-30 11:49:23 +08:00
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
2016-01-29 17:39:33 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'with only required parameters' do
|
|
|
|
let :params do
|
|
|
|
req_params
|
|
|
|
end
|
|
|
|
|
2020-05-17 09:21:48 +09:00
|
|
|
it { is_expected.to contain_openstacklib__db__postgresql('nova_api').with(
|
|
|
|
:user => 'nova_api',
|
|
|
|
:password => 'novapass',
|
|
|
|
:dbname => 'nova_api',
|
|
|
|
:encoding => nil,
|
|
|
|
:privileges => 'ALL',
|
2016-01-29 17:39:33 -05:00
|
|
|
)}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-30 11:49:23 +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:51:10 +09:00
|
|
|
# puppet-postgresql requires the service_provider fact provided by
|
|
|
|
# puppetlabs-postgresql.
|
|
|
|
:service_provider => 'systemd'
|
2016-04-30 11:49:23 +08:00
|
|
|
}))
|
2016-01-29 17:39:33 -05:00
|
|
|
end
|
|
|
|
|
2022-07-24 00:51:10 +09:00
|
|
|
it_configures 'nova::db::postgresql'
|
2016-01-29 17:39:33 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|