summaryrefslogtreecommitdiff
path: root/spec/acceptance
diff options
context:
space:
mode:
authorTravis Fields <travis@puppetlabs.com>2015-07-20 14:35:57 -0700
committerTravis Fields <travis@puppetlabs.com>2015-07-20 15:51:39 -0700
commit78e8c73671d0d3b69b2999094ec3af638327f7c0 (patch)
treeb37f5fbb9fc6e48366408e266b91f01d174db943 /spec/acceptance
parent1282649b91b482dd547b674f4d52af166a5eab69 (diff)
(maint) Fix test to not assume is_pe fact on > 4.0.0 puppet
Diffstat (limited to 'spec/acceptance')
-rw-r--r--spec/acceptance/fqdn_rand_string_spec.rb3
-rwxr-xr-xspec/acceptance/fqdn_rotate_spec.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/spec/acceptance/fqdn_rand_string_spec.rb b/spec/acceptance/fqdn_rand_string_spec.rb
index 881cff3..fec3c93 100644
--- a/spec/acceptance/fqdn_rand_string_spec.rb
+++ b/spec/acceptance/fqdn_rand_string_spec.rb
@@ -4,7 +4,8 @@ require 'spec_helper_acceptance'
describe 'fqdn_rand_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'success' do
let(:facts_d) do
- if fact('is_pe', '--puppet') == "true"
+ puppet_version = (on default, puppet('--version')).output.chomp
+ if puppet_version < '4.0.0' && fact('is_pe', '--puppet') == "true"
if fact('osfamily') =~ /windows/i
if fact('kernelmajversion').to_f < 6.0
'c:/documents and settings/all users/application data/puppetlabs/facter/facts.d'
diff --git a/spec/acceptance/fqdn_rotate_spec.rb b/spec/acceptance/fqdn_rotate_spec.rb
index f1a15d3..556c609 100755
--- a/spec/acceptance/fqdn_rotate_spec.rb
+++ b/spec/acceptance/fqdn_rotate_spec.rb
@@ -4,7 +4,8 @@ require 'spec_helper_acceptance'
describe 'fqdn_rotate function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
describe 'success' do
let(:facts_d) do
- if fact('is_pe', '--puppet') == "true"
+ puppet_version = (on default, puppet('--version')).output.chomp
+ if puppet_version < '4.0.0' && fact('is_pe', '--puppet') == "true"
if fact('osfamily') =~ /windows/i
if fact('kernelmajversion').to_f < 6.0
'C:/Documents and Settings/All Users/Application Data/PuppetLabs/facter/facts.d'