Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to get tests running on RHEL5. #515

Merged
merged 1 commit into from May 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions spec/acceptance/mysql_bindings_spec.rb
Expand Up @@ -54,6 +54,13 @@

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

if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') =~ /(5|6)/
it 'adds epel' do
pp = "class { 'epel': }"
apply_manifest(pp, :catch_failures => true)
end
end

describe 'running puppet code' do
it 'should work with no errors' do
pp = <<-EOS
Expand Down
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/centos-510-x64.yml
@@ -0,0 +1,10 @@
HOSTS:
centos-510-x64:
roles:
- master
platform: el-5-x86_64
box : centos-510-x64-virtualbox-nocm
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-510-x64-virtualbox-nocm.box
hypervisor : vagrant
CONFIG:
type: git
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/centos-59-x64.yml
@@ -0,0 +1,10 @@
HOSTS:
centos-59-x64:
roles:
- master
platform: el-5-x86_64
box : centos-59-x64-vbox4210-nocm
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box
hypervisor : vagrant
CONFIG:
type: git
11 changes: 1 addition & 10 deletions spec/spec_helper_acceptance.rb
Expand Up @@ -29,20 +29,11 @@
if fact('osfamily') == 'RedHat'
version = fact("operatingsystemmajrelease")
shell("yum localinstall -y http://yum.puppetlabs.com/puppetlabs-release-el-#{version}.noarch.rpm")
if version == '6'
shell("yum localinstall -y http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm")
elsif version == '5'
shell("yum localinstall -y http://mirrors.servercentral.net/fedora/epel/5/i386/epel-release-5-4.noarch.rpm")
elsif version == '7'
puts "There aren't actually any failures on RHEL7 without EPEL."
else
puts "Sorry, this version is not supported."
exit
end
end

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