]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/blob - spec/spec_helper_acceptance.rb
Merge branch '1.4.x'
[puppet-modules/puppetlabs-apt.git] / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec'
2
3 # Install Puppet
4 unless ENV['RS_PROVISION'] == 'no'
5   hosts.each do |host|
6     if host.is_pe?
7       install_pe
8     else
9       install_puppet
10       on host, "mkdir -p #{host['distmoduledir']}"
11     end
12   end
13 end
14
15 RSpec.configure do |c|
16   # Project root
17   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
18
19   # Readable test descriptions
20   c.formatter = :documentation
21
22   # Configure all nodes in nodeset
23   c.before :suite do
24     # Install module and dependencies
25     puppet_module_install(:source => proj_root, :module_name => 'apt')
26     hosts.each do |host|
27       shell('/bin/touch /etc/puppet/hiera.yaml')
28       shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] })
29     end
30   end
31 end