Test multiple operating systems for policy

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

Change-Id: I7dfd86776646a15de9b3a18788d3e97dde73b9dc
This commit is contained in:
ZhongShengping 2016-06-03 23:58:14 +08:00
parent 62db37cc72
commit 6b352f0620
1 changed files with 9 additions and 12 deletions

View File

@ -24,19 +24,16 @@ describe 'barbican::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 'barbican policies'
it_configures 'barbican policies'
end
end
context 'on RedHat platforms' do
let :facts do
@default_facts.merge({ :osfamily => 'RedHat' })
end
it_configures 'barbican policies'
end
end