Skip to content

Commit

Permalink
(maint) resolve spec test changes from updated module
Browse files Browse the repository at this point in the history
With server version 14 https://github.com/puppetlabs/puppetlabs-postgresql/blob/411e7bce3f2d5256c315351144dc525b6c0afbbe/manifests/params.pp#L28
the default hash is scram, so the fixture needed to be updated. Additionally, the
`client_cert` validation parameter is now always `verify-full` because of the updated
postgres version.
  • Loading branch information
jonathannewman committed Feb 15, 2024
1 parent a322a7a commit 88cf73b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/support/unit/shared/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
it { is_expected.to raise_error(error) }
else
let(:identity_map_key) { "#{with[:database_name]}-#{with[:database_username]}-map" }
let(:client_cert) { (with[:postgres_version].to_f >= 12.0) ? 'verify-full' : '1' }
let(:client_cert) { 'verify-full' }

it { is_expected.to contain_puppetdb__database__postgresql_ssl_rules(name).with(with) }

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/classes/database/postgresql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
{
read_database_username: params[:read_database_username],
database_name: params[:database_name],
password_hash: 'md588e898a4bade3fe1c9b96f650ec85900', # TODO: mock properly
password_hash: 'SCRAM-SHA-256$4096:cHVwcGV0ZGItcmVhZA==$qJ2Yyu4715ht/e8AFkvuzM8DdHyU2fTz9/slcH8r8j8=:VpRBz0fk+87tv1NlNHoR7Z2RyTVJJO42EtgQmKFlyPE=', # TODO: mock properly
database_owner: params[:database_username],
}
end
Expand Down

0 comments on commit 88cf73b

Please sign in to comment.