Merge pull request #129 from mcanevet/feature/enable_strict_variables
Auto enable strict_variables for unit tests when puppet > 3.5
This commit is contained in:
commit
19935e65da
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ env:
|
|||
- PUPPET_GEM_VERSION="~> 2.7"
|
||||
- PUPPET_GEM_VERSION="~> 3.3"
|
||||
- PUPPET_GEM_VERSION="> 3.3"
|
||||
- PUPPET_GEM_VERSION="~> 3.5.0.rc3" STRICT_VARIABLES="yes"
|
||||
- PUPPET_GEM_VERSION="~> 3.5.0"
|
||||
global:
|
||||
- PUBLISHER_LOGIN=puppetlabs
|
||||
- secure: "FInoEwh3G4Auqp+OOdIc20lDLqrV6FHzWsM8ercHWjhDRD23VI49B1qqehWjaI8lKM3D5mTvdup23IVQBJo8M0rR/yfju1NhMYFTQ5bcJIrbQ3fn4n/zSaE8gLTOtHwzjSlqTJAYjxOAnp1VdMZngqpU/RYfSk68zJD34NqfovA="
|
||||
|
|
|
@ -14,7 +14,7 @@ RSpec.configure do |c|
|
|||
@old_env = {}
|
||||
ENV.each_key {|k| @old_env[k] = ENV[k]}
|
||||
|
||||
if ENV['STRICT_VARIABLES'] == 'yes'
|
||||
if Gem::Version.new(`puppet --version`) >= Gem::Version.new('3.5')
|
||||
Puppet.settings[:strict_variables]=true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue