@@ -123,7 +123,6 @@ def latest_sources
123
123
end
124
124
125
125
puppet_7_collection = 'puppet7'
126
- puppet_8_collection = 'puppet8'
127
126
128
127
# We can only test puppet 7 -> 7 upgrades if multiple Puppet releases
129
128
# have supported a given platform.
@@ -162,6 +161,7 @@ def latest_sources
162
161
expect ( res [ 'value' ] [ 'version' ] ) . to eq ( puppet_7_version )
163
162
end
164
163
expect ( res [ 'value' ] [ 'source' ] ) . to be
164
+ logger . info ( "Successfully installed puppet-agent version: #{ res [ 'value' ] [ 'version' ] } " )
165
165
end
166
166
167
167
# Check that puppet agent service has been stopped due to 'stop_service' parameter set to true
@@ -175,7 +175,7 @@ def latest_sources
175
175
176
176
# Try to upgrade with no specific version given in parameter
177
177
# Expect nothing to happen and receive a message regarding this
178
- results = run_task ( 'puppet_agent::install' , 'target' , { 'collection' => puppet_8_collection } )
178
+ results = run_task ( 'puppet_agent::install' , 'target' , { 'collection' => 'puppet8-nightly' } . merge ( latest_sources ) )
179
179
180
180
results . each do |result |
181
181
logger . info ( "Ensuring installed puppet-agent on #{ result [ 'target' ] } : #{ result [ 'status' ] } " )
@@ -220,6 +220,7 @@ def latest_sources
220
220
expect ( res [ 'value' ] [ 'version' ] ) . not_to eq ( puppet_7_version )
221
221
expect ( res [ 'value' ] [ 'version' ] ) . to match ( %r{^7\. \d +\. \d +} )
222
222
expect ( res [ 'value' ] [ 'source' ] ) . to be
223
+ logger . info ( "Successfully upgraded to puppet7 latest version: #{ res [ 'value' ] [ 'version' ] } " )
223
224
end
224
225
end
225
226
@@ -239,8 +240,8 @@ def latest_sources
239
240
end
240
241
241
242
# Succesfully upgrade from puppet7 to puppet8
242
- results = run_task ( 'puppet_agent::install' , 'target' , { 'collection' => puppet_8_collection , 'version' => 'latest' } )
243
-
243
+ results = run_task ( 'puppet_agent::install' , 'target' , { 'collection' => 'puppet8-nightly' ,
244
+ 'version' => 'latest' } . merge ( latest_sources ) )
244
245
results . each do |result |
245
246
logger . info ( "Upgraded puppet-agent to puppet8 on #{ result [ 'target' ] } : #{ result [ 'status' ] } " )
246
247
log_output_errors ( result )
@@ -257,12 +258,13 @@ def latest_sources
257
258
expect ( installed_version ) . not_to match ( %r{^7\. \d +\. \d +} )
258
259
expect ( installed_version ) . to match ( %r{^8\. \d +\. \d +} )
259
260
expect ( res [ 'value' ] [ 'source' ] ) . to be
261
+ logger . info ( "Successfully upgraded to puppet8 latest version: #{ res [ 'value' ] [ 'version' ] } " )
260
262
end
261
263
262
264
# Try installing the same version again
263
265
# Expect nothing to happen and receive a message regarding this
264
- results = run_task ( 'puppet_agent::install' , 'target' , { 'collection' => puppet_8_collection , 'version' => installed_version } )
265
-
266
+ results = run_task ( 'puppet_agent::install' , 'target' , { 'collection' => 'puppet8-nightly' ,
267
+ 'version' => installed_version } . merge ( latest_sources ) )
266
268
results . each do |res |
267
269
expect ( res ) . to include ( 'status' => 'success' )
268
270
expect ( res [ 'value' ] [ '_output' ] ) . to match ( %r{Puppet Agent #{ installed_version } detected. Nothing to do.} )
0 commit comments