Fix unit tests incompatible with puppetlab-stdlib 8.0.0

Since puppetlabs-stdlib 8.0.0, ensure_packages automatically translates
'ensure => present'  to 'ensure => installed' and that translation
breaks existing assertions in unit tests.

Change-Id: I394fc6112eb68a9f0decae275299f26e44812b44
This commit is contained in:
Takashi Kajinami 2021-09-24 00:24:40 +09:00
parent 38d52dfce4
commit 123acbb302
2 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ describe 'nova::compute' do
it 'installs genisoimage package and sets config_drive_format' do
is_expected.to contain_nova_config('DEFAULT/config_drive_format').with_value('<SERVICE DEFAULT>')
is_expected.to contain_package('genisoimage').with(
:ensure => 'present',
:ensure => 'installed',
)
is_expected.to contain_package('genisoimage').that_requires('Anchor[nova::install::begin]')
is_expected.to contain_package('genisoimage').that_comes_before('Anchor[nova::install::end]')
@ -148,7 +148,7 @@ describe 'nova::compute' do
is_expected.to contain_nova_config('barbican/barbican_endpoint').with_value('http://localhost')
is_expected.to contain_nova_config('barbican/barbican_api_version').with_value('v1')
is_expected.to contain_nova_config('barbican/auth_endpoint').with_value('http://127.0.0.1:5000/v3')
is_expected.to contain_package('cryptsetup').with( :ensure => 'present' )
is_expected.to contain_package('cryptsetup').with_ensure('installed')
end
it 'configures vnc in nova.conf' do

View File

@ -15,7 +15,7 @@ describe 'nova::key_manager::barbican' do
)
is_expected.to contain_package('cryptsetup').with(
:ensure => 'present',
:ensure => 'installed',
:tag => 'openstack',
)
}
@ -46,7 +46,7 @@ describe 'nova::key_manager::barbican' do
)
is_expected.to contain_package('cryptsetup').with(
:ensure => 'present',
:ensure => 'installed',
:tag => 'openstack',
)
}