Test multiple operating systems for policy

Use on_supported_os function to test multiple
operating systems for class keystone::policy.

Change-Id: I8719ba5ad534ae8311f4417cb3769dcb8c1107aa
This commit is contained in:
ZhongShengping 2016-06-04 00:17:54 +08:00
parent 7e0cc49ea6
commit b111078f73

View File

@ -24,19 +24,16 @@ describe 'keystone::policy' do
end
end
context 'on Debian platforms' do
let :facts do
@default_facts.merge({ :osfamily => 'Debian' })
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts({:processorcount => 8}))
end
it_configures 'keystone policies'
it_configures 'keystone policies'
end
end
context 'on RedHat platforms' do
let :facts do
@default_facts.merge({ :osfamily => 'RedHat' })
end
it_configures 'keystone policies'
end
end