2014-12-30 22:10:44 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'neutron::db::postgresql' do
|
2018-11-28 17:43:42 +01:00
|
|
|
shared_examples 'neutron::db::postgresql' do
|
2016-04-30 11:45:04 +08:00
|
|
|
let :req_params do
|
2020-05-19 20:27:12 +09:00
|
|
|
{ :password => 'neutronpass' }
|
2016-04-30 11:45:04 +08:00
|
|
|
end
|
2014-12-30 22:10:44 +01:00
|
|
|
|
2016-04-30 11:45:04 +08:00
|
|
|
let :pre_condition do
|
|
|
|
'include postgresql::server'
|
|
|
|
end
|
2014-12-30 22:10:44 +01:00
|
|
|
|
|
|
|
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('neutron::deps') }
|
|
|
|
|
2020-05-19 20:27:12 +09:00
|
|
|
it { is_expected.to contain_openstacklib__db__postgresql('neutron').with(
|
|
|
|
:user => 'neutron',
|
|
|
|
:password => 'neutronpass',
|
|
|
|
:dbname => 'neutron',
|
|
|
|
:encoding => nil,
|
|
|
|
:privileges => 'ALL',
|
2014-12-30 22:10:44 +01:00
|
|
|
)}
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-04-30 11:45:04 +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:50:19 +09:00
|
|
|
# puppet-postgresql requires the service_provider fact provided by
|
|
|
|
# puppetlabs-postgresql.
|
|
|
|
:service_provider => 'systemd'
|
2016-04-30 11:45:04 +08:00
|
|
|
}))
|
2014-12-30 22:10:44 +01:00
|
|
|
end
|
|
|
|
|
2022-07-24 00:50:19 +09:00
|
|
|
it_behaves_like 'neutron::db::postgresql'
|
2014-12-30 22:10:44 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|