11require 'English'
2- require 'beaker-puppet'
2+ require 'beaker_puppet_helpers'
3+ require 'beaker_puppet_helpers/dsl'
34require 'bundler'
45
56# SIMP namespace
67module Simp ; end
78
89# SIMP Beaker helper methods for testing
910module Simp ::BeakerHelpers
10- include BeakerPuppet
11+ include BeakerPuppetHelpers
12+ include BeakerPuppetHelpers ::DSL
1113
1214 require 'simp/beaker_helpers/constants'
1315 require 'simp/beaker_helpers/inspec'
@@ -16,6 +18,9 @@ module Simp::BeakerHelpers
1618 require 'simp/beaker_helpers/version'
1719 require 'find'
1820
21+ PUPPET_MODULE_INSTALL_IGNORE = [ '/.bundle' , '/.git' , '/.idea' , '/.vagrant' , '/.vendor' , '/vendor' , '/acceptance' ,
22+ '/bundle' , '/spec' , '/tests' , '/log' , '/.svn' , '/junit' , '/pkg' , '/example' , '/tmp' ] . freeze
23+
1924 @run_in_parallel = ( ENV [ 'BEAKER_SIMP_parallel' ] == 'yes' )
2025
2126 # Stealing this from the Ruby 2.5 Dir::Tmpname workaround from Rails
@@ -782,14 +787,6 @@ def linux_errata(suts)
782787 on sut , 'puppet config set stringify_facts false'
783788 end
784789
785- # Occasionally we run across something similar to BKR-561, so to ensure we
786- # at least have the host defaults:
787- #
788- # :hieradatadir is used as a canary here; it isn't the only missing key
789- unless sut . host_hash . key? :hieradatadir
790- configure_type_defaults_on ( sut )
791- end
792-
793790 if os_info [ 'family' ] == 'RedHat'
794791 # OS-specific items
795792 if os_info [ 'name' ] == 'RedHat'
@@ -1502,10 +1499,8 @@ def run_puppet_install_helper_on(hosts)
15021499 def install_puppet
15031500 install_info = get_puppet_install_info
15041501
1505- # In case Beaker needs this info internally
1506- if install_info [ :puppet_collection ]
1507- ENV [ 'BEAKER_PUPPET_COLLECTION' ] = install_info [ :puppet_collection ]
1508- end
1502+ # In case Beaker needs this info internally
1503+ ENV [ 'BEAKER_PUPPET_COLLECTION' ] ||= install_info [ :puppet_collection ] if install_info . is_a? ( Hash ) && install_info . key? ( :puppet_collection )
15091504
15101505 require 'beaker_puppet_helpers'
15111506 run_puppet_install_helper_on ( hosts )
0 commit comments