]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/keystone/spec/spec_helper_acceptance.rb
try with modules from master
[dsa-puppet.git] / 3rdparty / modules / keystone / spec / spec_helper_acceptance.rb
1 require 'beaker-rspec'
2 require 'beaker/puppet_install_helper'
3
4 run_puppet_install_helper
5
6 RSpec.configure do |c|
7   # Project root
8   proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
9
10   # Readable test descriptions
11   c.formatter = :documentation
12
13   # Configure all nodes in nodeset
14   c.before :suite do
15     # Install module and dependencies
16     hosts.each do |host|
17
18       # install git
19       install_package host, 'git'
20
21       # clean out any module cruft
22       shell('rm -fr /etc/puppet/modules/*')
23
24       # install library modules from the forge
25       on host, puppet('module','install','puppetlabs-mysql'), { :acceptable_exit_codes => 0 }
26       on host, puppet('module','install','dprince/qpid'), { :acceptable_exit_codes => 0 }
27       on host, puppet('module','install','duritong/sysctl'), { :acceptable_exit_codes => 0 }
28       on host, puppet('module','install','puppetlabs-inifile'), { :acceptable_exit_codes => 0 }
29       on host, puppet('module','install','puppetlabs-rabbitmq'), { :acceptable_exit_codes => 0 }
30       on host, puppet('module','install','puppetlabs-apache'), { :acceptable_exit_codes => 0 }
31
32       # install puppet modules from git, use master
33       shell('git clone https://git.openstack.org/openstack/puppet-openstacklib /etc/puppet/modules/openstacklib')
34       shell('git clone https://git.openstack.org/openstack/puppet-openstack_extras /etc/puppet/modules/openstack_extras')
35
36       # Install the module being tested
37       puppet_module_install(:source => proj_root, :module_name => 'keystone')
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