Revert "CentOS 9: Disable unit tests dependent on puppet-postgresql"

This reverts commit 2a0ba18656.

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
This commit is contained in:
Takashi Kajinami 2022-07-24 01:03:32 +09:00
parent fc6277302c
commit 627b63ac1a
1 changed files with 7 additions and 6 deletions

View File

@ -10,7 +10,7 @@ describe 'watcher::db::postgresql' do
{ :password => 'watcherpass' }
end
shared_examples_for 'watcher-db-postgresql' do
shared_examples_for 'watcher::db::postgresql' do
context 'with only required parameters' do
let :params do
required_params
@ -33,13 +33,14 @@ describe 'watcher::db::postgresql' do
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts({ :concat_basedir => '/var/lib/puppet/concat' }))
facts.merge!(OSDefaults.get_facts({
# puppet-postgresql requires the service_provider fact provided by
# puppetlabs-postgresql.
:service_provider => 'systemd'
}))
end
# TODO(tkajinam): Remove this once puppet-postgresql supports CentOS 9
unless facts[:osfamily] == 'RedHat' and facts[:operatingsystemmajrelease].to_i >= 9
it_behaves_like 'watcher-db-postgresql'
end
it_behaves_like 'watcher::db::postgresql'
end
end
end