Skip to content

Commit

Permalink
Merge pull request #3 from Mayflower/support_ubuntu
Browse files Browse the repository at this point in the history
add osfamily debian to params
  • Loading branch information
Joshua Hoblitt committed Mar 31, 2014
2 parents bf84ffb + 92f8e41 commit 00253ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

case $::osfamily {
'redhat': {}
'debian': {}
default: {
fail("Module ${module_name} is not supported on ${::operatingsystem}")
}
Expand Down
12 changes: 9 additions & 3 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
it { should include_class('udev::params') }
end

describe 'for osfamily Debian' do
let(:facts) {{ :osfamily => 'Debian' }}

it { should include_class('udev::params') }
end

describe 'unsupported osfamily' do
let :facts do
{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:osfamily => 'Suse',
:operatingsystem => 'OpenSuSE',
}
end

it 'should fail' do
expect { should include_class('udev::params') }.
to raise_error(Puppet::Error, /not supported on Debian/)
to raise_error(Puppet::Error, /not supported on OpenSuSE/)
end
end

Expand Down

0 comments on commit 00253ed

Please sign in to comment.