Add helper to install puppet/pe/puppet-agent
[puppet-modules/puppetlabs-apt.git] / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec'
2 require 'beaker/puppet_install_helper'
3
4 run_puppet_install_helper
5
6 UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris']
7
8 RSpec.configure do |c|
9   # Project root
10   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
11
12   # Readable test descriptions
13   c.formatter = :documentation
14
15   # Configure all nodes in nodeset
16   c.before :suite do
17     # Install module and dependencies
18     hosts.each do |host|
19       copy_module_to(host, :source => proj_root, :module_name => 'apt')
20       shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
21       on host, puppet('module install puppetlabs-stdlib --version 4.5.0'), { :acceptable_exit_codes => [0,1] }
22     end
23   end
24 end