Skip to content

Commit ecb67d3

Browse files
committed
(maint) test: support debian 12 in acceptance tests
cherry-pick of 6dfc2b4
1 parent 0e83f3b commit ecb67d3

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

acceptance/helper.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ def is_bullseye()
296296
return test_config[:os_families].has_key? 'debian11-64-1'
297297
end
298298

299+
def is_bookworm()
300+
return test_config[:os_families].has_key? 'debian12-64-1'
301+
end
302+
299303
def is_el7()
300304
return test_config[:os_families].has_key?('redhat7-64-1') ||
301305
test_config[:os_families].has_key?('centos7-64-1')
@@ -343,8 +347,8 @@ def puppet_repo_version(platform_version, install_type, nightly)
343347
# always use the non-nightly version
344348
platform_version
345349
when :upgrade_oldest
346-
# Debian 11, Ubuntu 22, and RHEL 9 only have builds starting in the 7 series
347-
if is_bullseye || is_jammy || is_el9
350+
# Debian 11 & 12, Ubuntu 22, and RHEL 9 only have builds starting in the 7 series
351+
if is_bullseye || is_jammy || is_el9 || is_bookworm
348352
:puppet7
349353
else
350354
:puppet6
@@ -371,6 +375,8 @@ def oldest_supported
371375
'6.12.0'
372376
elsif is_jammy
373377
'7.14.0'
378+
elsif is_bookworm
379+
'7.20.0'
374380
else
375381
'6.0.0'
376382
end
@@ -444,6 +450,8 @@ def get_package_version(host, version = nil)
444450
"#{version}buster"
445451
elsif host['platform'].include?('debian-11')
446452
"#{version}bullseye"
453+
elsif host['platform'].include?('debian-12')
454+
"#{version}bookworm"
447455
else
448456
raise ArgumentError, "Unsupported platform: '#{host['platform']}'"
449457
end

acceptance/setup/pre_suite/05_clear_firewalls.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
unless (test_config[:skip_presuite_provisioning])
22
step "Flushing iptables chains" do
33
hosts.each do |host|
4-
on host, 'apt-get install -y iptables' if is_bullseye
4+
on host, 'apt-get install -y iptables' if (is_bullseye || is_bookworm)
55
on host, "iptables -F INPUT -t filter"
66
on host, "iptables -F FORWARD -t filter"
77
end

0 commit comments

Comments
 (0)