Skip to content

Commit 61ad3bf

Browse files
committed
Merge pull request #124 from hunner/add_helper
Add helper to install puppet/pe/puppet-agent
2 parents 43afc29 + 3a58378 commit 61ad3bf

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
require 'beaker-rspec/spec_helper'
22
require 'beaker-rspec/helpers/serverspec'
3+
require 'beaker/puppet_install_helper'
34

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

19-
hosts.each do |host|
20-
if not host.is_pe? and host['platform'] !~ /windows/i
21-
on host, 'puppet master'
22-
on host, "mkdir -p #{host['distmoduledir']}"
23-
elsif host["platform"] =~ /solaris/
24-
on host, "echo 'export PATH=/opt/puppet/bin:/var/ruby/1.8/gem_home/bin:${PATH}' >> ~/.bashrc"
25-
elsif host.is_pe?
26-
on host, "echo 'export PATH=#{host['puppetbindir']}:${PATH}' >> ~/.bashrc"
27-
end
28-
on host, "mkdir -p #{host['distmoduledir']}"
29-
end
30-
end
7+
UNSUPPORTED_PLATFORMS = []
318

329
def create_keys_for_test(host)
3310
# Generate private key and CA for keystore

0 commit comments

Comments
 (0)