From 9bbeaeaaa8099b911b2627137679c15ef2bdde23 Mon Sep 17 00:00:00 2001 From: Jake Spain Date: Mon, 11 Sep 2023 16:35:51 -0400 Subject: [PATCH] Add Debian 12 - 14 support --- lib/beaker/platform.rb | 5 ++++- spec/beaker/platform_spec.rb | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/beaker/platform.rb b/lib/beaker/platform.rb index 8bac957de..138767480 100644 --- a/lib/beaker/platform.rb +++ b/lib/beaker/platform.rb @@ -6,7 +6,10 @@ class Platform < String PLATFORMS = /^(alpine|huaweios|cisco_nexus|cisco_ios_xr|(free|open)bsd|osx|centos|fedora|debian|oracle|redhat|redhatfips|scientific|opensuse|sles|ubuntu|windows|solaris|aix|archlinux|el|eos|cumulus|f5|netscaler)\-.+\-.+$/ # Platform version numbers vs. codenames conversion hash PLATFORM_VERSION_CODES = - { :debian => { "bullseye" => "11", + { :debian => { "forky" => "14", + "trixie" => "13", + "bookworm" => "12", + "bullseye" => "11", "buster" => "10", "stretch" => "9", "jessie" => "8", diff --git a/spec/beaker/platform_spec.rb b/spec/beaker/platform_spec.rb index 8336dba47..6e731b936 100644 --- a/spec/beaker/platform_spec.rb +++ b/spec/beaker/platform_spec.rb @@ -58,6 +58,21 @@ module Beaker end context 'with_version_codename' do + it "can convert debian-14-xxx to debian-forky-xxx" do + @name = 'debian-14-xxx' + expect(platform.with_version_codename).to be === 'debian-forky-xxx' + end + + it "can convert debian-13-xxx to debian-trixie-xxx" do + @name = 'debian-13-xxx' + expect(platform.with_version_codename).to be === 'debian-trixie-xxx' + end + + it "can convert debian-12-xxx to debian-bookworm-xxx" do + @name = 'debian-12-xxx' + expect(platform.with_version_codename).to be === 'debian-bookworm-xxx' + end + it "can convert debian-11-xxx to debian-bullseye-xxx" do @name = 'debian-11-xxx' expect(platform.with_version_codename).to be === 'debian-bullseye-xxx'