]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
[MODULES-4224] Implement beaker-module_install_helper implement-beaker-module_install_helper
authorWilson McCoubrey <wilson@puppet.com>
Tue, 10 Jan 2017 11:42:40 +0000 (11:42 +0000)
committerWilson McCoubrey <wilson@puppet.com>
Tue, 10 Jan 2017 11:42:40 +0000 (11:42 +0000)
Gemfile updated by modulesync PR: puppetlabs/modulesync_configs#122

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 bc0506f74923233b9572926c2c72284625a02056..c1217ce282570b4a809b17b6b3d4dd4792b8aa3f 100644 (file)
@@ -1,5 +1,6 @@
 require 'beaker-rspec'
 require 'beaker/puppet_install_helper'
+require 'beaker/module_install_helper'
 
 def iptables_flush_all_tables
   ['filter', 'nat', 'mangle', 'raw'].each do |t|
@@ -22,18 +23,14 @@ def do_catch_changes
 end
 
 run_puppet_install_helper
+install_module_on(hosts)
+install_module_dependencies_on(hosts)
 
 RSpec.configure do |c|
-  # Project root
-  proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
-
   # 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 => 'firewall')
-      on host, puppet('module install puppetlabs-stdlib --version 3.2.0')
-
       # the ubuntu-14.04 docker image doesn't carry the iptables command
       apply_manifest_on host, 'package { "iptables": ensure => installed }' if fact('osfamily') == 'Debian'
     end