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) · 960 Bytes
/
spec_helper_acceptance.rb
File metadata and controls
33 lines (28 loc) · 960 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'
if hosts.first.is_pe?
install_pe
else
install_puppet({ :version => '3.6.2',
:facter_version => '2.1.0',
:hiera_version => '1.3.4',
:default_action => 'gem_install' })
hosts.each {|h| on h, "/bin/echo '' > #{h['hieraconf']}" }
end
hosts.each do |host|
on host, "mkdir -p #{host['distmoduledir']}"
on host, 'puppet module install puppetlabs-stdlib', :acceptable_exit_codes => [0,1]
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
puppet_module_install(:source => proj_root, :module_name => 'python')
end
end