Skip to content

Commit

Permalink
(maint) Use correct providers to install gems
Browse files Browse the repository at this point in the history
Prior to this commit, the test setup was using the same gem
provider for PE and FOSS and all versions. Correct this so that
it using the correct provider with certain versions of puppet and
PE.
  • Loading branch information
HAIL9000 committed Nov 10, 2016
1 parent f2b97ce commit 07d6416
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
unless ENV['RS_PROVISION'] == 'no'
run_puppet_install_helper
hosts.each do |host|
on host, puppet('resource package hocon provider=puppet_gem')
puppet_version = (on default, puppet('--version')).output.chomp

if ENV['PUPPET_INSTALL_TYPE'] == 'pe'
if Gem::Version.new(puppet_version) < Gem::Version.new('4.0.0')
on host, puppet('resource package hocon provider=pe_gem')
else
on host, puppet('resource package hocon provider=puppet_gem')
end
else
on host, puppet('resource package rubygems')
on host, puppet('resource package hocon provider=gem')
end
end
end

Expand Down

0 comments on commit 07d6416

Please sign in to comment.