@@ -207,9 +207,8 @@ def host_to_info_s(host)
207207 # purpose to facilitate an upgrade scenario.
208208 #
209209 # @param [Beaker::Host] host The host
210- # @param [String] initial_package_version_or_collection Either a version
211- # of puppet-agent or the name of a puppet collection to install the agent from.
212- def set_up_initial_agent_on ( host , initial_package_version_or_collection )
210+ # @param [Hash] options Install options
211+ def set_up_initial_agent_on ( host , options )
213212 master_agent_version = fact_on ( master , 'aio_agent_version' )
214213 unless master_agent_version
215214 fail_test ( 'Expected puppet-agent to already be installed on the master, but it was not. ' \
@@ -224,17 +223,7 @@ def set_up_initial_agent_on(host, initial_package_version_or_collection)
224223
225224 step 'Set-up the agents to upgrade' do
226225 step '(Agent) Install the puppet-agent package' do
227- initial_package_version_or_collection ||= master_agent_version
228- agent_install_options = if %r{(^pc1$|^puppet\d +)}i . match? ( initial_package_version_or_collection )
229- { puppet_collection : initial_package_version_or_collection }
230- else
231- {
232- puppet_agent_version : initial_package_version_or_collection ,
233- puppet_collection : puppet_collection_for ( :puppet_agent , initial_package_version_or_collection )
234- }
235- end
236-
237- install_puppet_agent_on ( host , agent_install_options )
226+ install_puppet_agent_on ( host , options )
238227
239228 # beaker-puppet doesn't add signing information to the apt source list, but this module does.
240229 # This discrepancy causes apt to error, so we manually add signing info.
0 commit comments