forked from voxpupuli/puppet-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec_helper_acceptance.rb
More file actions
33 lines (28 loc) · 926 Bytes
/
spec_helper_acceptance.rb
File metadata and controls
33 lines (28 loc) · 926 Bytes
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
require 'beaker-rspec'
UNSUPPORTED_PLATFORMS = [ 'windows' ]
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
hosts.each do |host|
if host.is_pe?
install_pe
else
install_puppet
end
end
end
RSpec.configure do |c|
# Project root
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
# Readable test descriptions
c.formatter = :documentation
# Configure all nodes in nodeset
c.before :suite do
# Install module and dependencies
hosts.each do |host|
shell("rm -rf /etc/puppet/modules/python/")
copy_module_to(host, :source => proj_root, :module_name => 'python')
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
on host, puppet('module install puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module install stahnma-epel'), { :acceptable_exit_codes => [0,1] }
end
end
end