forked from jhoblitt/puppet-ganglia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove usage of $::lsbmajdistrelease fact
Instead use $::operatingsystemmajrelease as this fact is not dependant on redhat-lsb being present on the system.
- Loading branch information
Joshua Hoblitt
committed
Sep 21, 2013
1 parent
cd410c3
commit 2e4a9d4
Showing
6 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
require 'spec_helper' | ||
|
||
describe 'ganglia::params', :type => :class do | ||
|
||
describe 'for osfamily RedHat' do | ||
let(:facts) {{ :osfamily => 'RedHat' }} | ||
|
||
describe 'el5.x' do | ||
before { facts[:operatingsystemmajrelease] = '5' } | ||
|
||
it { should include_class('ganglia::params') } | ||
end | ||
|
||
describe 'el6.x' do | ||
before { facts[:operatingsystemmajrelease] = '6' } | ||
|
||
it { should include_class('ganglia::params') } | ||
end | ||
|
||
describe 'el7.x+/fedora' do | ||
before { facts[:operatingsystemmajrelease] = '7' } | ||
|
||
it { should include_class('ganglia::params') } | ||
end | ||
|
||
describe 'el4.x' do | ||
before { facts[:operatingsystemmajrelease] = '4' } | ||
|
||
it 'should fail' do | ||
expect { should include_class('ganglia::params') }. | ||
to raise_error(Puppet::Error, /not supported on operatingsystemmajrelease/) | ||
end | ||
end | ||
end | ||
|
||
describe 'unsupported osfamily' do | ||
let :facts do | ||
{ | ||
:osfamily => 'Debian', | ||
:operatingsystem => 'Debian', | ||
} | ||
end | ||
|
||
it 'should fail' do | ||
expect { should include_class('ganglia::params') }. | ||
to raise_error(Puppet::Error, /not supported on Debian/) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters