]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #652 from puppetlabs/implement-beaker-module_install_helper
authorEric Putnam <putnam.eric@gmail.com>
Wed, 11 Jan 2017 14:48:43 +0000 (09:48 -0500)
committerGitHub <noreply@github.com>
Wed, 11 Jan 2017 14:48:43 +0000 (09:48 -0500)
[MODULES-4224] Implement beaker-module_install_helper

Gemfile
spec/spec_helper_acceptance.rb

diff --git a/Gemfile b/Gemfile
index 3d46720d2fad1525beba321b55bc3ff8c488ed27..5820775a362b1dcdba4e45288a8597be2f53c199 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -59,6 +59,7 @@ group :system_tests do
   gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4')     if ! supports_windows
   gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '~> 5.1')     if supports_windows
   gem 'beaker-puppet_install_helper',                                            :require => false
+  gem 'beaker-module_install_helper',                                            :require => false
   gem 'master_manipulator',                                                      :require => false
   gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
   gem 'beaker-abs', *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')        
index 3f87bd13da68829c6b1e4d1f794a1f5962c38873..30eccbf625d362e901791f3bbdb16478f99032f1 100644 (file)
@@ -1,7 +1,10 @@
 require 'beaker-rspec'
 require 'beaker/puppet_install_helper'
+require 'beaker/module_install_helper'
 
 run_puppet_install_helper
+install_module_on(hosts)
+install_module_dependencies_on(hosts)
 
 UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris']
 
@@ -37,14 +40,4 @@ RSpec.configure do |c|
 
   # Readable test descriptions
   c.formatter = :documentation
-
-  # Configure all nodes in nodeset
-  c.before :suite do
-    # Install module and dependencies
-    hosts.each do |host|
-      copy_module_to(host, :source => proj_root, :module_name => 'apt')
-      shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
-      on host, puppet('module install puppetlabs-stdlib --version 4.13.1')
-    end
-  end
 end