Skip to content

Commit d6f934f

Browse files
committed
Added support for EL7.
1 parent 2dae883 commit d6f934f

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# el5.x
1919
$ipmi_package = ['OpenIPMI', 'OpenIPMI-tools']
2020
}
21-
6: {
21+
6, 7: {
2222
# el6.x
2323
$ipmi_package = ['OpenIPMI', 'ipmitool']
2424
}

spec/classes/ipmi_install_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222

2323
describe 'el6.x' do
2424
before { facts[:operatingsystemmajrelease] = '6' }
25+
26+
it { should include_class('ipmi::install') }
27+
it { should contain_package('OpenIPMI').with_ensure('present') }
28+
it { should contain_package('ipmitool').with_ensure('present') }
29+
end
30+
31+
describe 'el7.x' do
32+
before { facts[:operatingsystemmajrelease] = '7' }
2533

2634
it { should include_class('ipmi::install') }
2735
it { should contain_package('OpenIPMI').with_ensure('present') }

spec/classes/ipmi_params_spec.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616
it { should include_class('ipmi::params') }
1717
end
1818

19-
describe 'unsupported operatingsystemmajrelease' do
19+
describe 'el7.x' do
2020
before { facts[:operatingsystemmajrelease] = '7' }
2121

22+
it { should include_class('ipmi::params') }
23+
end
24+
25+
describe 'unsupported operatingsystemmajrelease' do
26+
before { facts[:operatingsystemmajrelease] = '1' }
27+
2228
it 'should fail' do
2329
expect { should include_class('ipmi::params') }.
24-
to raise_error(Puppet::Error, /not supported on operatingsystemmajrelease 7/)
30+
to raise_error(Puppet::Error, /not supported on operatingsystemmajrelease 1/)
2531
end
2632
end
2733
end

0 commit comments

Comments
 (0)