Skip to content

Commit 53257df

Browse files
committed
Add helper to install puppet/pe/puppet-agent
1 parent 2a9ff96 commit 53257df

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ group :system_tests do
2828
gem 'beaker-rspec', :require => false
2929
end
3030
gem 'serverspec', :require => false
31+
gem 'beaker-puppet_install_helper', :require => false
3132
end
3233

3334

spec/spec_helper_acceptance.rb

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
require 'beaker-rspec'
2+
require 'beaker/puppet_install_helper'
23

3-
UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ]
4-
5-
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
6-
# This will install the latest available package on el and deb based
7-
# systems fail on windows and osx, and install via gem on other *nixes
8-
foss_opts = {
9-
:default_action => 'gem_install',
10-
:version => (ENV['PUPPET_VERSION'] || '3.8.1'),
11-
}
12-
13-
if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end
4+
run_puppet_install_helper
145

15-
hosts.each do |host|
16-
on hosts, "mkdir -p #{host['distmoduledir']}"
17-
end
18-
end
6+
UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ]
197

208
RSpec.configure do |c|
219
# Project root
@@ -38,7 +26,6 @@
3826
end
3927
end
4028

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

0 commit comments

Comments
 (0)