From 53257df16f4503faac42e403a9a49d7b33772278 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 11 Jun 2015 15:36:41 -0700 Subject: [PATCH] Add helper to install puppet/pe/puppet-agent --- Gemfile | 1 + spec/spec_helper_acceptance.rb | 19 +++---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 2b1b7cd8d..bfe64b186 100644 --- a/Gemfile +++ b/Gemfile @@ -28,6 +28,7 @@ group :system_tests do gem 'beaker-rspec', :require => false end gem 'serverspec', :require => false + gem 'beaker-puppet_install_helper', :require => false end diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 5f8a6e905..edc231d92 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,21 +1,9 @@ require 'beaker-rspec' +require 'beaker/puppet_install_helper' -UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ] - -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', - :version => (ENV['PUPPET_VERSION'] || '3.8.1'), - } - - if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end +run_puppet_install_helper - hosts.each do |host| - on hosts, "mkdir -p #{host['distmoduledir']}" - end -end +UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ] RSpec.configure do |c| # Project root @@ -38,7 +26,6 @@ end end - shell("/bin/touch #{default['puppetpath']}/hiera.yaml") on host, 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