Skip to content

Commit

Permalink
Clean up acceptance spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Oct 19, 2019
1 parent a3aeae0 commit ed93212
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed93212

Please sign in to comment.