Skip to content

Commit 9657e31

Browse files
committed
(PA-7433) Update task_spec to upgrade from puppet7 to latest puppet8 dev build
Previously, the puppet_agent::install task to install or upgrade to puppet8 used puppet8 builds from downloads.puppet.com. Since puppet8 builds are no longer published there, this commit updates the puppet_agent::install task to install or upgrade to puppet8 using the puppet8 dev builds from artifactory instead. This commit also adds some logger.info statements so it's easier to track what specific version of puppet-agent is being upgraded to or installed.
1 parent de4dedc commit 9657e31

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

task_spec/spec/acceptance/init_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def latest_sources
122122
end
123123

124124
puppet_7_collection = 'puppet7'
125-
puppet_8_collection = 'puppet8'
126125

127126
# We can only test puppet 7 -> 7 upgrades if multiple Puppet releases
128127
# have supported a given platform.
@@ -161,6 +160,7 @@ def latest_sources
161160
expect(res['value']['version']).to eq(puppet_7_version)
162161
end
163162
expect(res['value']['source']).to be
163+
logger.info("Successfully installed puppet-agent version: #{res['value']['version']}")
164164
end
165165

166166
# Check that puppet agent service has been stopped due to 'stop_service' parameter set to true
@@ -174,7 +174,7 @@ def latest_sources
174174

175175
# Try to upgrade with no specific version given in parameter
176176
# Expect nothing to happen and receive a message regarding this
177-
results = run_task('puppet_agent::install', 'target', { 'collection' => puppet_8_collection })
177+
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet8-nightly'}.merge(latest_sources))
178178

179179
results.each do |result|
180180
logger.info("Ensuring installed puppet-agent on #{result['target']}: #{result['status']}")
@@ -219,6 +219,7 @@ def latest_sources
219219
expect(res['value']['version']).not_to eq(puppet_7_version)
220220
expect(res['value']['version']).to match(%r{^7\.\d+\.\d+})
221221
expect(res['value']['source']).to be
222+
logger.info("Successfully upgraded to puppet7 latest version: #{res['value']['version']}")
222223
end
223224
end
224225

@@ -238,7 +239,8 @@ def latest_sources
238239
end
239240

240241
# Succesfully upgrade from puppet7 to puppet8
241-
results = run_task('puppet_agent::install', 'target', { 'collection' => puppet_8_collection, 'version' => 'latest' })
242+
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet8-nightly',
243+
'version' => 'latest'}.merge(latest_sources))
242244

243245
results.each do |result|
244246
logger.info("Upgraded puppet-agent to puppet8 on #{result['target']}: #{result['status']}")
@@ -256,11 +258,13 @@ def latest_sources
256258
expect(installed_version).not_to match(%r{^7\.\d+\.\d+})
257259
expect(installed_version).to match(%r{^8\.\d+\.\d+})
258260
expect(res['value']['source']).to be
261+
logger.info("Successfully upgraded to puppet8 latest version: #{res['value']['version']}")
259262
end
260263

261264
# Try installing the same version again
262265
# Expect nothing to happen and receive a message regarding this
263-
results = run_task('puppet_agent::install', 'target', { 'collection' => puppet_8_collection, 'version' => installed_version })
266+
results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet8-nightly',
267+
'version' => installed_version}.merge(latest_sources))
264268

265269
results.each do |res|
266270
expect(res).to include('status' => 'success')

0 commit comments

Comments
 (0)