Skip to content

Commit

Permalink
(maint) test: support debian 12 in acceptance tests
Browse files Browse the repository at this point in the history
cherry-pick of 6dfc2b4
  • Loading branch information
austb committed Oct 14, 2024
1 parent 0e83f3b commit ecb67d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions acceptance/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ def is_bullseye()
return test_config[:os_families].has_key? 'debian11-64-1'
end

def is_bookworm()
return test_config[:os_families].has_key? 'debian12-64-1'
end

def is_el7()
return test_config[:os_families].has_key?('redhat7-64-1') ||
test_config[:os_families].has_key?('centos7-64-1')
Expand Down Expand Up @@ -343,8 +347,8 @@ def puppet_repo_version(platform_version, install_type, nightly)
# always use the non-nightly version
platform_version
when :upgrade_oldest
# Debian 11, Ubuntu 22, and RHEL 9 only have builds starting in the 7 series
if is_bullseye || is_jammy || is_el9
# Debian 11 & 12, Ubuntu 22, and RHEL 9 only have builds starting in the 7 series
if is_bullseye || is_jammy || is_el9 || is_bookworm
:puppet7
else
:puppet6
Expand All @@ -371,6 +375,8 @@ def oldest_supported
'6.12.0'
elsif is_jammy
'7.14.0'
elsif is_bookworm
'7.20.0'
else
'6.0.0'
end
Expand Down Expand Up @@ -444,6 +450,8 @@ def get_package_version(host, version = nil)
"#{version}buster"
elsif host['platform'].include?('debian-11')
"#{version}bullseye"
elsif host['platform'].include?('debian-12')
"#{version}bookworm"
else
raise ArgumentError, "Unsupported platform: '#{host['platform']}'"
end
Expand Down
2 changes: 1 addition & 1 deletion acceptance/setup/pre_suite/05_clear_firewalls.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
unless (test_config[:skip_presuite_provisioning])
step "Flushing iptables chains" do
hosts.each do |host|
on host, 'apt-get install -y iptables' if is_bullseye
on host, 'apt-get install -y iptables' if (is_bullseye || is_bookworm)
on host, "iptables -F INPUT -t filter"
on host, "iptables -F FORWARD -t filter"
end
Expand Down

0 comments on commit ecb67d3

Please sign in to comment.