Use beaker-puppet_install_helper to install puppet

When running with BEAKER_provision=no, the following happens:

In Trusty: beaker is running dpkg with '--force' option so even
if Puppet is already installed, the return code will be 0.
In CentOS: beaker is running 'rpm -ivh' the second time and since
the package is already here, the return code will be 1.

Using the new puppet install helper will abort installing puppet
if BEAKER_provision is no, so tests will continue as normal.

Change-Id: I30ade99fd33b76ebb3959851902746f58a249ff1
Co-Authored-By: Colleen Murphy <colleen@gazlene.net>
This commit is contained in:
Emilien Macchi 2015-06-30 16:58:59 -04:00
parent 95b4d9d6af
commit 13c40e8d0d
2 changed files with 3 additions and 6 deletions

View File

@ -17,6 +17,7 @@ group :development, :test do
gem 'puppet-lint-numericvariable' gem 'puppet-lint-numericvariable'
gem 'beaker-rspec', :require => false gem 'beaker-rspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'json' gem 'json'
gem 'webmock' gem 'webmock'
end end

View File

@ -1,11 +1,7 @@
require 'beaker-rspec' require 'beaker-rspec'
require 'beaker/puppet_install_helper'
hosts.each do |host| run_puppet_install_helper
install_puppet
on host, "mkdir -p #{host['distmoduledir']}"
end
RSpec.configure do |c| RSpec.configure do |c|
# Project root # Project root