]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/openstacklib/spec/spec_helper_acceptance.rb
try with modules from master
[dsa-puppet.git] / 3rdparty / modules / openstacklib / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec'
2
3 hosts.each do |host|
4
5   install_puppet
6
7   on host, "mkdir -p #{host['distmoduledir']}"
8 end
9
10 RSpec.configure do |c|
11   # Project root
12   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
13
14   # Readable test descriptions
15   c.formatter = :documentation
16
17   # Configure all nodes in nodeset
18   c.before :suite do
19     # Install module and dependencies
20     hosts.each do |host|
21
22       # install git
23       install_package host, 'git'
24
25       # clean out any module cruft
26       shell('rm -fr /etc/puppet/modules/*')
27
28       # install library modules from the forge
29       on host, puppet('module','install','puppetlabs-mysql'), { :acceptable_exit_codes => 0 }
30       on host, puppet('module','install','puppetlabs-apache'), { :acceptable_exit_codes => 0 }
31       on host, puppet('module','install','puppetlabs-postgresql'), { :acceptable_exit_codes => 0 }
32       on host, puppet('module','install','stahnma-epel'), { :acceptable_exit_codes => 0 }
33       # until https://github.com/tamaskozak/puppetlabs-rabbitmq/commit/8bbfe320035fae2ae900211501008d63dc3c171c is part of a release
34       shell('git clone https://github.com/puppetlabs/puppetlabs-rabbitmq /etc/puppet/modules/rabbitmq')
35       shell('git clone https://git.openstack.org/openstack/puppet-openstack_extras /etc/puppet/modules/openstack_extras')
36       # Install the module being tested
37       puppet_module_install(:source => proj_root, :module_name => 'openstacklib')
38       # List modules installed to help with debugging
39       on hosts[0], puppet('module','list'), { :acceptable_exit_codes => 0 }
40     end
41   end
42 end