Skip to content

Commit 61a6abb

Browse files
jonathannewmanh0tw1r3
authored andcommitted
(maint) resolve test changes from updating postgresql module
1 parent 697d79a commit 61a6abb

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

spec/acceptance/standalone_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
let(:puppetdb_params) {}
77
let(:puppetdb_master_config_params) {}
88

9-
# TODO: temporary work-around for EL installs
10-
let(:postgres_version) { "(getvar('facts.os.family') == 'RedHat') ? { true => '12', default => undef }" }
9+
let(:postgres_version) { 'undef' } # default
1110
let(:manage_firewall) { "(getvar('facts.os.family') == 'RedHat' and Integer(getvar('facts.os.release.major')) > 7)" }
1211

1312
describe 'with defaults' do

spec/support/acceptance/shared/puppetdb.rb

-12
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@
33
shared_examples 'puppetdb' do
44
let(:pp) do
55
<<~PP
6-
# FIXME: temporary work-around for EL installs
76
if $facts['os']['family'] == 'RedHat' {
8-
$gpg_key_file = $facts['os']['release']['major'] ? {
9-
'7' => 'PGDG-RPM-GPG-KEY-RHEL7',
10-
default => 'PGDG-RPM-GPG-KEY-RHEL',
11-
}
12-
file { "/etc/pki/rpm-gpg/${gpg_key_file}":
13-
source => "https://download.postgresql.org/pub/repos/yum/keys/${gpg_key_file}",
14-
}
15-
-> Yumrepo <| tag == 'postgresql::repo' |> {
16-
gpgkey => "file:///etc/pki/rpm-gpg/${gpg_key_file}",
17-
}
18-
197
# Work-around EL systemd in docker bug affecting forked services
208
file_line { 'puppetdb-unit-remove-pidfile':
219
path => '/lib/systemd/system/puppetdb.service',

spec/support/unit/shared/database.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
end
221221

222222
shared_examples 'puppetdb::database::postgresql_ssl_rules' do |error|
223-
let(:defaults) { {} }
223+
let(:defaults) { { postgres_version: '14' } }
224224
let(:with) { defined?(args) ? defaults.merge(args) : defaults }
225225

226226
if error

spec/unit/classes/database/postgresql_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
{
9595
read_database_username: params[:read_database_username],
9696
database_name: params[:database_name],
97-
password_hash: 'md588e898a4bade3fe1c9b96f650ec85900', # TODO: mock properly
97+
password_hash: %r{^(md5|SCRAM)}, # TODO: mock properly
9898
database_owner: params[:database_username],
9999
}
100100
end

0 commit comments

Comments
 (0)