From 9dd00aab2de3c4b364de8bd90e630173e3f4ed19 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 11 Jun 2015 15:28:34 -0700 Subject: [PATCH] Add helper to install puppet/pe/puppet-agent --- Gemfile | 1 + spec/spec_helper_acceptance.rb | 14 +++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index cc4048aec..a1cfe6c19 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ group :system_tests do gem 'beaker-rspec', :require => false end gem 'serverspec', :require => false + gem 'beaker-puppet_install_helper', :require => false end if facterversion = ENV['FACTER_GEM_VERSION'] diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index da994f8df..805104649 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,20 +1,12 @@ require 'beaker-rspec/spec_helper' require 'beaker-rspec/helpers/serverspec' require 'acceptance/specinfra_stubs' +require 'beaker/puppet_install_helper' -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - # This will install the latest available package on el and deb based - # systems fail on windows and osx, and install via gem on other *nixes - foss_opts = {:default_action => 'gem_install'} - - if default.is_pe?; then - install_pe; - else - install_puppet(foss_opts); - end +run_puppet_install_helper +unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' hosts.each do |host| - on hosts, "mkdir -p #{host['distmoduledir']}" if host['platform'] =~ /sles-1/i || host['platform'] =~ /solaris-1/i get_stdlib = <<-EOS package{'wget':}