From 2104bc49915117d34dd898831536aed80d547e07 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 1 Nov 2023 19:15:29 +0900 Subject: [PATCH] Do not test details of openstacklib::db::postgresql ... but only assert the inputs for the defined resource type. This allows us to avoid unit test failure caused by changes in underlying modules. Change-Id: Iabcf453028e284ee3cc5ede1bb637b79cedf1fea --- spec/classes/ironic_db_postgresql_spec.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spec/classes/ironic_db_postgresql_spec.rb b/spec/classes/ironic_db_postgresql_spec.rb index e8f761e0..7840f74d 100644 --- a/spec/classes/ironic_db_postgresql_spec.rb +++ b/spec/classes/ironic_db_postgresql_spec.rb @@ -4,7 +4,7 @@ describe 'ironic::db::postgresql' do shared_examples_for 'ironic::db::postgresql' do let :req_params do - { :password => 'pw' } + { :password => 'ironicpass' } end let :pre_condition do @@ -18,9 +18,12 @@ describe 'ironic::db::postgresql' do it { is_expected.to contain_class('ironic::deps') } - it { is_expected.to contain_postgresql__server__db('ironic').with( - :user => 'ironic', - :password => 'md554bdb85e136b50c40104fd9f73e1294d' + it { is_expected.to contain_openstacklib__db__postgresql('ironic').with( + :user => 'ironic', + :password => 'ironicpass', + :dbname => 'ironic', + :encoding => nil, + :privileges => 'ALL', )} end