2014-01-22 02:52:37 +01:00
|
|
|
require 'beaker-rspec/spec_helper'
|
|
|
|
require 'beaker-rspec/helpers/serverspec'
|
|
|
|
|
2014-02-26 22:14:19 +01:00
|
|
|
unless ENV['RS_PROVISION'] == 'no'
|
2014-05-22 01:37:17 +02:00
|
|
|
if hosts.first.is_pe?
|
|
|
|
install_pe
|
|
|
|
else
|
|
|
|
install_puppet
|
|
|
|
end
|
2014-02-26 22:14:19 +01:00
|
|
|
hosts.each do |host|
|
|
|
|
if host['platform'] =~ /debian/
|
|
|
|
on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc'
|
|
|
|
on host, "mkdir -p #{host['distmoduledir']}"
|
|
|
|
end
|
2014-01-22 02:52:37 +01:00
|
|
|
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
|
2014-06-24 01:56:40 +02:00
|
|
|
hosts.each do |host|
|
|
|
|
if host['platform'] !~ /windows/i
|
|
|
|
copy_root_module_to(host, :source => proj_root, :module_name => 'inifile')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
hosts.each do |host|
|
|
|
|
if host['platform'] =~ /windows/i
|
|
|
|
on host, puppet('plugin download')
|
|
|
|
end
|
|
|
|
end
|
2014-01-22 02:52:37 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
c.treat_symbols_as_metadata_keys_with_true_values = true
|
|
|
|
end
|