
Beaker [https://github.com/puppetlabs/beaker] is the tool used by Puppetlabs for its acceptance tests. Replace the test-kitchen scripts, configuration, and dependencies by Beaker ones. Change-Id: I075265871f32f447021f7e1d6e2e2fe9e5c6049d Fixes-bug: https://midonet.atlassian.net/browse/MDT-27
33 lines
1.4 KiB
Ruby
33 lines
1.4 KiB
Ruby
require 'beaker-rspec'
|
|
require 'beaker/puppet_install_helper'
|
|
|
|
run_puppet_install_helper
|
|
|
|
UNSUPPORTED_PLATFORMS = ['Suse','windows','AIX','Solaris']
|
|
|
|
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|
|
|
copy_module_to(host, :source => proj_root, :module_name => 'midonet')
|
|
scp_to(host, proj_root + '/data/hiera.yaml', "#{default['puppetpath']}/hiera.yaml")
|
|
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
|
|
on host, puppet('module install ripienaar-module_data'), {:acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install puppetlabs-stdlib --version 4.5.0'), { :acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install midonet-zookeeper'), {:acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install midonet-cassandra'), {:acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install puppetlabs-inifile'), {:acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install puppetlabs-apt'), {:acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install puppetlabs-java'), {:acceptable_exit_codes => [0,1] }
|
|
on host, puppet('module install puppetlabs-tomcat'), {:acceptable_exit_codes => [0,1] }
|
|
end
|
|
end
|
|
end
|