Skip to content

Commit

Permalink
acceptance/helpers.rb: add signed-by to apt sources.list
Browse files Browse the repository at this point in the history
  • Loading branch information
mhashizume authored and kenyon committed Jul 9, 2024
1 parent 30505fb commit 87d67b2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions acceptance/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ def set_up_initial_agent_on(host, initial_package_version_or_collection)
end

install_puppet_agent_on(host, agent_install_options)

# beaker-puppet doesn't add signing information to the apt source list, but this module does.
# This discrepancy causes apt to error, so we manually add signing info.
if %r{debian|ubuntu}.match?(host['platform'])
step '(Agent) Add apt signing information' do
on(host, "sed -e 's/^deb http/deb [signed-by=\\/etc\\/apt\\/keyrings\\/GPG-KEY-puppet-20250406.asc] http/' /etc/apt/sources.list.d/puppet*.list -i")
end
end

teardowns << -> do
remove_installed_agent(host)
end
Expand Down

0 comments on commit 87d67b2

Please sign in to comment.