2 require 'beaker/puppet_install_helper'
4 run_puppet_install_helper
6 UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris']
8 # This method allows a block to be passed in and if an exception is raised
9 # that matches the 'error_matcher' matcher, the block will wait a set number
10 # of seconds before retrying.
12 # - max_retry_count - Max number of retries
13 # - retry_wait_interval_secs - Number of seconds to wait before retry
14 # - error_matcher - Matcher which the exception raised must match to allow retry
16 # retry_on_error_matching(3, 5, /OpenGPG Error/) do
17 # apply_manifest(pp, :catch_failures => true)
19 def retry_on_error_matching(max_retry_count = 3, retry_wait_interval_secs = 5, error_matcher = nil)
25 if try < max_retry_count && (error_matcher == nil || e.message =~ error_matcher)
26 sleep retry_wait_interval_secs
34 RSpec.configure do |c|
36 proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
38 # Readable test descriptions
39 c.formatter = :documentation
41 # Configure all nodes in nodeset
43 # Install module and dependencies
45 copy_module_to(host, :source => proj_root, :module_name => 'apt')
46 shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
47 on host, puppet('module install puppetlabs-stdlib --version 4.5.0'), { :acceptable_exit_codes => [0,1] }