Add support to select rspec-puppet version

The plan is that we fix up the non-voting latest unit
test job and make sure it uses puppet 6.0.4 and
rspec-puppet 2.7.1 and then use that to work our way
through the modules and fix the testing.

When that is done we can update all unit testing to
use rspec-puppet 2.7.1

Depends-On: https://review.openstack.org/#/c/618915/
Change-Id: I6b8a540a8f52512d491a1250159ddfc60a1b55e2
This commit is contained in:
Tobias Urdin 2018-11-19 23:15:58 +01:00
parent e7fb7150e5
commit 631dbc6108
1 changed files with 6 additions and 1 deletions

View File

@ -23,7 +23,12 @@ Gem::Specification.new do |spec|
puppetversion = ENV.key?('PUPPET_GEM_VERSION') ? ENV['PUPPET_GEM_VERSION'] : ['~> 5.5']
spec.add_dependency 'puppet', puppetversion
spec.add_dependency 'rspec-puppet', ['~> 2.3.0']
# TODO(tobias-urdin): We need to bump this to 2.7.1 soon which will cause strict checking
# of variables. This will break *a lot* of stuff because we are not properly including
# classes in pre_condition in many places which causes undefined variables.
rspec_puppet_version = ENV.key?('RSPEC_PUPPET_VERSION') ? ENV['RSPEC_PUPPET_VERSION'] : ['~> 2.3.0']
spec.add_dependency 'rspec-puppet', rspec_puppet_version
spec.add_dependency 'rspec-puppet-facts', ['>= 1.7.0']
spec.add_dependency 'metadata-json-lint'
spec.add_dependency 'puppet-lint-param-docs'