Skip to content

Commit 1d821ed

Browse files
authored
Merge pull request #9007 from joshcooper/hiera3_beaker
(maint) Install hiera v3 gem during beaker test
2 parents f4fbaaa + 03edcb0 commit 1d821ed

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

acceptance/tests/lookup/hiera3_custom_backend.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
step 'delete custom backend, restore default hiera config' do
2727
on(master, "rm #{existing_loadpath}/hiera/backend/custom_backend.rb", :acceptable_exit_codes => [0,1])
2828
on(master, "mv #{hiera_conf_backup} #{confdir}/hiera.yaml", :acceptable_exit_codes => [0,1])
29+
on(master, "/opt/puppetlabs/server/bin/puppetserver gem uninstall --executables --force hiera")
30+
on(master, "/opt/puppetlabs/puppet/bin/gem uninstall --executables --force hiera")
2931
end
3032

3133
agents.each do |agent|
@@ -35,6 +37,13 @@
3537
end
3638
end
3739

40+
step "install hiera v3 gem" do
41+
# for puppet agent <-> server, hiera must be installed using puppetserver's gem command
42+
on(master, "/opt/puppetlabs/server/bin/puppetserver gem install --no-document hiera")
43+
# for puppet lookup, hiera must be installed using puppet's gem command
44+
on(master, "/opt/puppetlabs/puppet/bin/gem install --no-document hiera")
45+
end
46+
3847
step "create hiera v5 config and v3 custom backend" do
3948
on(master, "cp #{confdir}/hiera.yaml /tmp")
4049
create_remote_file(master, "#{confdir}/hiera.yaml", <<-HIERA)

0 commit comments

Comments
 (0)