Skip to content

Commit 4fe4a5d

Browse files
author
Ashley Penney
committed
Merge pull request #515 from mhaskel/rhel5-fixes
Fixes to get tests running on RHEL5.
2 parents 3562043 + 3871ca4 commit 4fe4a5d

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

spec/acceptance/mysql_bindings_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@
5454

5555
describe 'mysql::bindings class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
5656

57+
if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') =~ /(5|6)/
58+
it 'adds epel' do
59+
pp = "class { 'epel': }"
60+
apply_manifest(pp, :catch_failures => true)
61+
end
62+
end
63+
5764
describe 'running puppet code' do
5865
it 'should work with no errors' do
5966
pp = <<-EOS
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
HOSTS:
2+
centos-510-x64:
3+
roles:
4+
- master
5+
platform: el-5-x86_64
6+
box : centos-510-x64-virtualbox-nocm
7+
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-510-x64-virtualbox-nocm.box
8+
hypervisor : vagrant
9+
CONFIG:
10+
type: git
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
HOSTS:
2+
centos-59-x64:
3+
roles:
4+
- master
5+
platform: el-5-x86_64
6+
box : centos-59-x64-vbox4210-nocm
7+
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box
8+
hypervisor : vagrant
9+
CONFIG:
10+
type: git

spec/spec_helper_acceptance.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,11 @@
2929
if fact('osfamily') == 'RedHat'
3030
version = fact("operatingsystemmajrelease")
3131
shell("yum localinstall -y http://yum.puppetlabs.com/puppetlabs-release-el-#{version}.noarch.rpm")
32-
if version == '6'
33-
shell("yum localinstall -y http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm")
34-
elsif version == '5'
35-
shell("yum localinstall -y http://mirrors.servercentral.net/fedora/epel/5/i386/epel-release-5-4.noarch.rpm")
36-
elsif version == '7'
37-
puts "There aren't actually any failures on RHEL7 without EPEL."
38-
else
39-
puts "Sorry, this version is not supported."
40-
exit
41-
end
4232
end
4333

4434
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
4535
shell('puppet module install puppetlabs-stdlib --version 3.2.0', { :acceptable_exit_codes => [0,1] })
36+
on host, puppet('module','install','stahnma/epel'), { :acceptable_exit_codes => [0,1] }
4637
end
4738
end
4839
end

0 commit comments

Comments
 (0)