Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions task_spec/spec/acceptance/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ def log_output_errors(result)
puts logger.info(out)
end

# Added this method to simplify the 'case' condition
# used for target_platform, which will use latest puppet_agent
# in below mentioned test spec
def latest_platform_list
%r{
el-9-aarch64|
ubuntu-22\.04-aarch64|
amazon-2023|
osx-14|
debian-12
}x
end

it 'works with version and install tasks' do
# Specify the first released version for each target platform. When adding a new
# OS, you'll typically want to specify 'latest' to install from nightlies, since
Expand All @@ -56,7 +69,7 @@ def log_output_errors(result)
'7.18.0'
when %r{osx-13}
'7.26.0'
when %r{el-9-aarch64}, %r{ubuntu-22.04-aarch64}, %r{amazon-2023-x86_64}, %r{amazon-2023-aarch64}, %r{osx-14}
when latest_platform_list
'latest'
else
'7.18.0'
Expand All @@ -71,7 +84,7 @@ def log_output_errors(result)
# else
# end
case target_platform
when %r{el-9-aarch64}, %r{ubuntu-22.04-aarch64}, %r{amazon-2023-x86_64}, %r{amazon-2023-aarch64}, %r{osx-14}
when latest_platform_list
puppet_7_collection = 'puppet7-nightly'
puppet_8_collection = 'puppet8-nightly'
else
Expand Down