From 1229d5a831995ddc2c9814f5104ea2a2c9df65a9 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Thu, 19 Jan 2017 16:17:47 -0800 Subject: (MODULES-4098) Sync the rest of the files --- spec/functions/deprecation_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/functions/deprecation_spec.rb') diff --git a/spec/functions/deprecation_spec.rb b/spec/functions/deprecation_spec.rb index cee4f1c..8a65b69 100644 --- a/spec/functions/deprecation_spec.rb +++ b/spec/functions/deprecation_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -if Puppet.version.to_f >= 4.0 +if Puppet.version.to_f >= 4.5 describe 'deprecation' do before(:each) { # this is to reset the strict variable to default @@ -40,7 +40,7 @@ if Puppet.version.to_f >= 4.0 Puppet.settings[:strict] = :warning } end -else +elsif Puppet.version.to_f < 4.0 # Puppet version < 4 will use these tests. describe 'deprecation' do after(:all) do -- cgit v1.2.3 From 318dcfaec6ba6d0e4af1e32e55ea20b721679537 Mon Sep 17 00:00:00 2001 From: Dominic Cleal Date: Tue, 14 Mar 2017 11:16:07 +0000 Subject: (MODULES-4528) Use versioncmp to check Puppet version for 4.10.x compat `Puppet.version.to_f` on Puppet 4.10.0 will evaluate to `4.1`, causing test and behavioural changes when conditionals check that the version is equal or greater than versions such as `4.3`. Version comparisons that are vulnerable to this have been changed to use Puppet's versioncmp implementation, while most others only check for for major version boundaries which is safe. --- spec/functions/deprecation_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/functions/deprecation_spec.rb') diff --git a/spec/functions/deprecation_spec.rb b/spec/functions/deprecation_spec.rb index 8a65b69..bde4e89 100644 --- a/spec/functions/deprecation_spec.rb +++ b/spec/functions/deprecation_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -if Puppet.version.to_f >= 4.5 +if Puppet::Util::Package.versioncmp(Puppet.version, '4.5.0') >= 0 describe 'deprecation' do before(:each) { # this is to reset the strict variable to default -- cgit v1.2.3