Skip to content

Commit

Permalink
Merge pull request #1 from austgate/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Feb 3, 2014
2 parents 95cb003 + e9e6361 commit b46ee6a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
class sysstat::params {
case $::osfamily {
'redhat': {
'debian', 'redhat': {
$sysstat_package = 'sysstat'
}
default: {
Expand Down
16 changes: 13 additions & 3 deletions spec/classes/sysstat_params_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@
it { should include_class('sysstat::params') }
end

describe 'for osfamily Debian' do
let :facts do
{
:osfamily => 'Debian',
}
end

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

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

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

Expand Down

0 comments on commit b46ee6a

Please sign in to comment.