Skip to content

Commit

Permalink
(maint) test: support debian 12 in acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
austb authored and rbrw committed Oct 3, 2024
1 parent ea6dc78 commit 890578d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion 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_el8()
return test_config[:os_families].has_key?('redhat8-64-1') ||
test_config[:os_families].has_key?('centos8-64-1')
Expand Down Expand Up @@ -340,7 +344,11 @@ def puppet_repo_version(platform_version, install_type, nightly)
# always use the non-nightly version to install released packages
sanitized_version
when :upgrade_oldest
:puppet7
if is_bookworm
:puppet8
else
:puppet7
end
end
end

Expand All @@ -353,6 +361,8 @@ def oldest_supported
'7.14.0'
elsif is_bullseye
'7.9.0'
elsif is_bookworm
'8.8.0'
else
'7.3.1'
end
Expand Down Expand Up @@ -426,6 +436,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 890578d

Please sign in to comment.