Initial tests with params, relevant to #25
[integration/packaging/puppet-opendaylight.git] / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec/spec_helper'
2 require 'beaker-rspec/helpers/serverspec'
3
4 unless ENV['BEAKER_provision'] == 'no'
5   hosts.each do |host|
6     # Install Puppet
7     if host.is_pe?
8       install_pe
9     else
10       install_puppet
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 => 'opendaylight')
26     hosts.each do |host|
27       on host, puppet('module', 'install', 'puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
28     end
29   end
30 end