2014-05-07 11:49:25 +02:00
|
|
|
#! /usr/bin/env ruby -S rspec
|
2014-03-12 19:22:23 +01:00
|
|
|
require 'beaker-rspec'
|
|
|
|
|
|
|
|
UNSUPPORTED_PLATFORMS = []
|
|
|
|
|
2014-04-09 23:35:34 +02:00
|
|
|
unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no'
|
2014-03-12 19:22:23 +01:00
|
|
|
hosts.each do |host|
|
|
|
|
# Install Puppet
|
|
|
|
if host.is_pe?
|
|
|
|
install_pe
|
|
|
|
else
|
2014-05-02 21:56:22 +02:00
|
|
|
install_puppet
|
2014-03-12 19:22:23 +01:00
|
|
|
on host, "mkdir -p #{host['distmoduledir']}"
|
|
|
|
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
|
|
|
|
puppet_module_install(:source => proj_root, :module_name => 'stdlib')
|
|
|
|
hosts.each do |host|
|
|
|
|
shell('/bin/touch /etc/puppet/hiera.yaml')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|