Assume structured fact in unit tests
The legacy fact has been deprecated and is no longer available in Puppet 8. Use the structured one to access fact values in tests so that we use the consistent method for fact value access. This change also fixes ignored unit tests of nova::migration::libvirt with modular libvirt daemons. Change-Id: I852facc2ee0ad2a948821f4232a1e8fc20ce4957 (cherry picked from commitdf8171df93
) (cherry picked from commit7c996fb434
)
This commit is contained in:
parent
f090015bb6
commit
9ce2f50886
@ -58,7 +58,7 @@ describe 'nova::compute::libvirt::services' do
|
||||
facts.merge!(OSDefaults.get_facts())
|
||||
end
|
||||
it_configures 'nova compute libvirt services'
|
||||
if facts['osfamily'] == 'RedHat'
|
||||
if facts[:os]['family'] == 'RedHat'
|
||||
it_configures 'nova compute libvirt services with modular libvirt'
|
||||
end
|
||||
end
|
||||
|
@ -464,8 +464,8 @@ describe 'nova::migration::libvirt' do
|
||||
end
|
||||
|
||||
it_behaves_like 'nova migration with libvirt'
|
||||
if facts['osfamily'] == 'RedHat'
|
||||
it_behaves_like 'nova migration with modulr libvirt'
|
||||
if facts[:os]['family'] == 'RedHat'
|
||||
it_behaves_like 'nova migration with modular libvirt'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user