X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fspec_helper_acceptance.rb;h=67bf096d830ae1c1b6449edf69773ca0a897772b;hb=fd53569ee8a3c16ba5f9ab1b5ae9782290e5f168;hp=1160438d9a0236981f8c0c230e930448b5871eec;hpb=90f5fdbce44d5fe61a70fb2129e01785e95c3218;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 1160438..67bf096 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -69,25 +69,21 @@ def retry_on_error_matching(max_retry_count = 3, retry_wait_interval_secs = 5, e begin try += 1 yield - rescue Exception => e - if try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher) - sleep retry_wait_interval_secs - retry - else - raise - end + rescue StandardError => e + raise unless try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher) + sleep retry_wait_interval_secs + retry end end RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) + File.expand_path(File.join(File.dirname(__FILE__), '..')) # Readable test descriptions c.formatter = :documentation # Configure all nodes in nodeset c.before :suite do - run_puppet_access_login(user: 'admin') if pe_install? + run_puppet_access_login(user: 'admin') if pe_install? && puppet_version =~ %r{(5\.\d\.\d)} end end