diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 9c2c10b7..6b4008af 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -4,22 +4,26 @@ require 'beaker/module_install_helper' run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' -install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ %r{pe}i -install_module_on(hosts) -install_module_dependencies_on(hosts) - -# Additional modules for soft deps -install_module_from_forge('puppetlabs-apt', '>= 4.4.0 < 8.0.0') -install_module_from_forge('stahnma-epel', '>= 1.2.0 < 2.0.0') -# We do not run Beaker acceptance tests on Windows or Gentoo at the moment. -# install_module_from_forge('puppet-chocolatey', '>= 2.0.0 < 4.0.0') -# install_module_from_forge('gentoo-portage', '>= 2.0.1 < 3.0.0') - -UNSUPPORTED_PLATFORMS = %w[AIX Solaris].freeze RSpec.configure do |c| # Readable test descriptions c.formatter = :documentation + + # Configure all nodes in nodeset + c.before :suite do + install_module + install_module_dependencies + + # Additional modules for soft deps + hosts.each do |host| + case fact_on(host, 'os.family') + when 'Debian' + install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.4.0 < 8.0.0') + when 'RedHat' + install_module_from_forge_on(host,'stahnma-epel', '>= 1.2.0 < 2.0.0') + end + end + end end shared_examples 'an idempotent resource' do