dashboard: more puppetish syntax
This commit is contained in:
parent
1bef33f8da
commit
4a3cd372fd
@ -70,8 +70,7 @@ class cloud::dashboard(
|
||||
$debug = $os_params::debug
|
||||
) {
|
||||
|
||||
$supported = [ 'RedHat', 'Debian' ]
|
||||
if grep($supported, $::osfamily) != [$::osfamily] {
|
||||
if ! ($::osfamily in [ 'RedHat', 'Debian' ]) {
|
||||
fail("module puppet-horizon doesn't support ${::osfamily}")
|
||||
}
|
||||
|
||||
|
@ -71,4 +71,16 @@ describe 'cloud::dashboard' do
|
||||
it_configures 'openstack dashboard'
|
||||
end
|
||||
|
||||
context 'on other platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Solaris',
|
||||
:operatingsystemrelease => '10',
|
||||
:concat_basedir => '/var/lib/puppet/concat' }
|
||||
end
|
||||
|
||||
it 'should fail' do
|
||||
expect { subject }.to raise_error(/module puppet-horizon doesn't support/)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user