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 commit df8171df9352f32fa768d8c8cb7197dbe50fb1e9)
This commit is contained in:
parent
74a42d6b33
commit
7c996fb434
@ -112,7 +112,7 @@ describe 'nova::compute::libvirt::services' do
|
||||
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
|
||||
|
@ -489,8 +489,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…
x
Reference in New Issue
Block a user