-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathspec_helper_acceptance.rb
28 lines (24 loc) · 1.18 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
require 'beaker-rspec/spec_helper'
require 'beaker-rspec/helpers/serverspec'
require 'beaker/puppet_install_helper'
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no'
RSpec.configure do |c|
# Project root
module_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
# Configure all nodes in nodeset
c.before :suite do
# Install module and deps
hosts.each do |host|
install_dev_puppet_module_on(host, source: module_root, module_name: 'autofs',
target_module_path: '/opt/puppetlabs/puppet/modules')
# Due to RE-6764, running yum update renders the machine unable to install
# other software. Thus this workaround. - thanks to Gareth Rushgrove's work for this
# if fact_on(host, 'operatingsystem') == 'RedHat'
# on(host, 'mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/internal-mirror.repo')
# end
# on(host, 'yum update -y -q') if fact_on(host, 'osfamily') == 'RedHat'
on host, puppet('module', 'install', 'puppetlabs-stdlib'), acceptable_exit_codes: [0, 1]
on host, puppet('module', 'install', 'puppetlabs-concat'), acceptable_exit_codes: [0, 1]
end
end
end