Test multiple operating systems for policy

Use on_supported_os function to test multiple operating systems for
class swift::client.

Change-Id: Id6c4739e637013b6120cc7ace9044c224bb7ab17
This commit is contained in:
zhubingbing 2018-04-12 11:33:12 +08:00
parent fc4dbae261
commit ee3ff43f44

View File

@ -27,19 +27,18 @@ describe 'swift::client' do
end
context 'on Debian platform' do
let :facts do
OSDefaults.get_facts({ :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({
:fqdn => 'some.host.tld',
}))
end
it_configures 'swift client'
it_configures 'swift client'
end
end
context 'on RedHat platform' do
let :facts do
OSDefaults.get_facts({ :osfamily => 'RedHat' })
end
it_configures 'swift client'
end
end