From e9e6361a2e52631b8b0637ec060ea1cdd1264c21 Mon Sep 17 00:00:00 2001 From: Iain Emsley Date: Thu, 19 Dec 2013 11:32:54 +0000 Subject: [PATCH] add Debian support --- manifests/params.pp | 2 +- spec/classes/sysstat_params_spec.rb | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 6ece10e..f380ab9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,7 +12,7 @@ # class sysstat::params { case $::osfamily { - 'redhat': { + 'debian', 'redhat': { $sysstat_package = 'sysstat' } default: { diff --git a/spec/classes/sysstat_params_spec.rb b/spec/classes/sysstat_params_spec.rb index b31ef1d..3599a1f 100644 --- a/spec/classes/sysstat_params_spec.rb +++ b/spec/classes/sysstat_params_spec.rb @@ -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