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({
|
2016-10-07 14:55:23 +03:00
|
|
|
:os_workers => 8,
|
2016-04-30 11:49:23 +08:00
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
}))
|
2016-01-29 17:39:33 -05:00
|
|
|
end
|
|
|
|
|
2022-02-16 00:14:14 +09:00
|
|
|
# TODO(tkajinam): Remove this once puppet-postgresql supports CentOS 9
|
|
|
|
unless facts[:osfamily] == 'RedHat' and facts[:operatingsystemmajrelease].to_i >= 9
|
|
|
|
it_configures 'nova::db::postgresql'
|
|
|
|
end
|
2016-01-29 17:39:33 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|