forked from voxpupuli/puppet-rabbitmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec_helper_acceptance.rb
38 lines (32 loc) · 1.09 KB
/
spec_helper_acceptance.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'beaker-rspec'
UNSUPPORTED_PLATFORMS = []
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
if hosts.first.is_pe?
install_pe
else
install_puppet
end
hosts.each do |host|
on hosts, "mkdir -p #{host['distmoduledir']}"
end
end
RSpec.configure do |c|
# Project root
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
# Readable test descriptions
c.formatter = :documentation
c.before :suite do
hosts.each do |host|
copy_module_to(host, :source => proj_root, :module_name => 'rabbitmq')
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
shell('puppet module install puppetlabs-stdlib', { :acceptable_exit_codes => [0,1] })
if fact('osfamily') == 'Debian'
shell('puppet module install puppetlabs-apt', { :acceptable_exit_codes => [0,1] })
end
shell('puppet module install nanliu-staging', { :acceptable_exit_codes => [0,1] })
if fact('osfamily') == 'RedHat'
shell('puppet module install garethr-erlang', { :acceptable_exit_codes => [0,1] })
end
end
end
end