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
This commit is contained in:
Takashi Kajinami 2023-11-01 19:15:29 +09:00
parent f916ae94d5
commit 2104bc4991
1 changed files with 7 additions and 4 deletions

View File

@ -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