diff --git a/lib/beaker/platform.rb b/lib/beaker/platform.rb index 7754e02d4..053d539ea 100644 --- a/lib/beaker/platform.rb +++ b/lib/beaker/platform.rb @@ -6,21 +6,23 @@ 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", - "buster" => "10", - "stretch" => "9", - "jessie" => "8", - "wheezy" => "7", - "squeeze" => "6", - }, - :ubuntu => { "jammy" => "2204", - "focal" => "2004", - "eoan" => "1910", - "disco" => "1904", - "cosmic" => "1810", - "bionic" => "1804", - "artful" => "1710", - "zesty" => "1704", + { :debian => { "forky" => "14", + "trixie" => "13", + "bookworm" => "12", + "bullseye" => "11", + "buster" => "10", + "stretch" => "9", + "jessie" => "8", + "wheezy" => "7", + "squeeze" => "6", }, + :ubuntu => { "jammy" => "2204", + "focal" => "2004", + "eoan" => "1910", + "disco" => "1904", + "cosmic" => "1810", + "bionic" => "1804", + "artful" => "1710", + "zesty" => "1704", "yakkety" => "1610", "xenial" => "1604", "wily" => "1510", diff --git a/spec/beaker/platform_spec.rb b/spec/beaker/platform_spec.rb index a1f6f0684..c2d3a5512 100644 --- a/spec/beaker/platform_spec.rb +++ b/spec/beaker/platform_spec.rb @@ -66,6 +66,20 @@ 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'