-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0270fec
commit 692b491
Showing
1 changed file
with
9 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,18 @@ | ||
require 'beaker-rspec' | ||
require 'beaker/puppet_install_helper' | ||
require 'beaker/module_install_helper' | ||
|
||
UNSUPPORTED_PLATFORMS = ['windows'].freeze | ||
|
||
unless ENV['RS_PROVISION'] == 'no' || ENV['BEAKER_provision'] == 'no' | ||
hosts.each do |host| | ||
if host.is_pe? | ||
install_pe | ||
else | ||
install_puppet | ||
end | ||
end | ||
end | ||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' | ||
install_ca_certs unless ENV['PUPPET_INSTALL_TYPE'] =~ %r{pe}i | ||
install_module_on(hosts) | ||
install_module_dependencies_on(hosts) | ||
|
||
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] | ||
hosts.each do |host| | ||
if host[:platform] =~ %r{el-7-x86_64} && host[:hypervisor] =~ %r{docker} | ||
on(host, "sed -i '/nodocs/d' /etc/yum.conf") | ||
end | ||
end | ||
end |