
This reverts commit 2a0ba1865617be25734ebf6ac5369af74a36ab7f. Reason for revert: puppet-postgresql 8.1.0 was released and now the module supports RHEL 9 (and CentOS 9 effectively). Note: This change adds the service_provider fact in test fact data because it is required by puppet-postgresql. Depends-on: https://review.opendev.org/850705 Change-Id: Ib30f5a866f2f7f922de3a7c700328b01edd89e00
47 lines
1.1 KiB
Ruby
47 lines
1.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'watcher::db::postgresql' do
|
|
|
|
let :pre_condition do
|
|
'include postgresql::server'
|
|
end
|
|
|
|
let :required_params do
|
|
{ :password => 'watcherpass' }
|
|
end
|
|
|
|
shared_examples_for 'watcher::db::postgresql' do
|
|
context 'with only required parameters' do
|
|
let :params do
|
|
required_params
|
|
end
|
|
|
|
it { is_expected.to contain_class('watcher::deps') }
|
|
|
|
it { is_expected.to contain_openstacklib__db__postgresql('watcher').with(
|
|
:user => 'watcher',
|
|
:password => 'watcherpass',
|
|
:dbname => 'watcher',
|
|
:encoding => nil,
|
|
:privileges => 'ALL',
|
|
)}
|
|
end
|
|
end
|
|
|
|
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({
|
|
# puppet-postgresql requires the service_provider fact provided by
|
|
# puppetlabs-postgresql.
|
|
:service_provider => 'systemd'
|
|
}))
|
|
end
|
|
|
|
it_behaves_like 'watcher::db::postgresql'
|
|
end
|
|
end
|
|
end
|