Skip to content

Commit 00253ed

Browse files
author
Joshua Hoblitt
committed
Merge pull request jhoblitt#3 from Mayflower/support_ubuntu
add osfamily debian to params
2 parents bf84ffb + 92f8e41 commit 00253ed

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
case $::osfamily {
1010
'redhat': {}
11+
'debian': {}
1112
default: {
1213
fail("Module ${module_name} is not supported on ${::operatingsystem}")
1314
}

spec/classes/params_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@
77
it { should include_class('udev::params') }
88
end
99

10+
describe 'for osfamily Debian' do
11+
let(:facts) {{ :osfamily => 'Debian' }}
12+
13+
it { should include_class('udev::params') }
14+
end
15+
1016
describe 'unsupported osfamily' do
1117
let :facts do
1218
{
13-
:osfamily => 'Debian',
14-
:operatingsystem => 'Debian',
19+
:osfamily => 'Suse',
20+
:operatingsystem => 'OpenSuSE',
1521
}
1622
end
1723

1824
it 'should fail' do
1925
expect { should include_class('udev::params') }.
20-
to raise_error(Puppet::Error, /not supported on Debian/)
26+
to raise_error(Puppet::Error, /not supported on OpenSuSE/)
2127
end
2228
end
2329

0 commit comments

Comments
 (0)