From 064a34090561d25cdacb1070f9ee7a1143a5874b Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 10 May 2024 16:36:03 +0200 Subject: [PATCH] Drop support for EoL Debian/Ubuntu versions --- lib/beaker/platform.rb | 24 +--------- spec/beaker/host/unix/file_spec.rb | 4 +- spec/beaker/platform_spec.rb | 70 +++++++++--------------------- 3 files changed, 24 insertions(+), 74 deletions(-) diff --git a/lib/beaker/platform.rb b/lib/beaker/platform.rb index caeaa4174..5289d2c62 100644 --- a/lib/beaker/platform.rb +++ b/lib/beaker/platform.rb @@ -10,31 +10,11 @@ class Platform < String "trixie" => "13", "bookworm" => "12", "bullseye" => "11", - "buster" => "10", - "stretch" => "9", - "jessie" => "8", - "wheezy" => "7", - "squeeze" => "6", }, + "buster" => "10", }, :ubuntu => { "noble" => "2404", "jammy" => "2204", "focal" => "2004", - "eoan" => "1910", - "disco" => "1904", - "cosmic" => "1810", - "bionic" => "1804", - "artful" => "1710", - "zesty" => "1704", - "yakkety" => "1610", - "xenial" => "1604", - "wily" => "1510", - "vivid" => "1504", - "utopic" => "1410", - "trusty" => "1404", - "saucy" => "1310", - "raring" => "1304", - "quantal" => "1210", - "precise" => "1204", - "lucid" => "1004", }, + "bionic" => "1804", }, :osx => { "highsierra" => "1013", "sierra" => "1012", "elcapitan" => "1011", diff --git a/spec/beaker/host/unix/file_spec.rb b/spec/beaker/host/unix/file_spec.rb index 6e66e7cff..ea10a5ef8 100644 --- a/spec/beaker/host/unix/file_spec.rb +++ b/spec/beaker/host/unix/file_spec.rb @@ -128,9 +128,9 @@ def to_s end it 'builds the filename correctly for debian-based platforms' do - @platform = 'debian-8-x86_64' + @platform = 'debian-12-x86_64' filename = instance.repo_filename('pkg_name', 'pkg_version10') - correct = 'pl-pkg_name-pkg_version10-jessie.list' + correct = 'pl-pkg_name-pkg_version10-bookworm.list' expect(filename).to be === correct end diff --git a/spec/beaker/platform_spec.rb b/spec/beaker/platform_spec.rb index 2db01c0bf..502c9f274 100644 --- a/spec/beaker/platform_spec.rb +++ b/spec/beaker/platform_spec.rb @@ -37,23 +37,23 @@ module Beaker describe "platforms with version and codename" do it "intializes both version and codename if given version" do - @name = "debian-7-x86_64" - expect(platform.version).to eq('7') - expect(platform.codename).to eq('wheezy') + @name = "debian-12-x86_64" + expect(platform.version).to eq('12') + expect(platform.codename).to eq('bookworm') end it "intializes both version and codename if given codename" do - @name = "debian-wheezy-x86_64" - expect(platform.version).to eq('7') - expect(platform.codename).to eq('wheezy') + @name = "debian-bookworm-x86_64" + expect(platform.version).to eq('12') + expect(platform.codename).to eq('bookworm') end end end context 'to_array' do it "converts Beaker::Platform object to array of its attribues" do - @name = 'debian-7-somethingsomething' - expect(platform.to_array).to be === %w[debian 7 somethingsomething wheezy] + @name = 'debian-12-somethingsomething' + expect(platform.to_array).to be === %w[debian 12 somethingsomething bookworm] end end @@ -78,16 +78,6 @@ module Beaker expect(platform.with_version_codename).to be === 'debian-bullseye-xxx' end - it "can convert debian-7-xxx to debian-wheezy-xxx" do - @name = 'debian-7-xxx' - expect(platform.with_version_codename).to be === 'debian-wheezy-xxx' - end - - it "can convert debian-6-xxx to debian-squeeze-xxx" do - @name = 'debian-6-xxx' - expect(platform.with_version_codename).to be === 'debian-squeeze-xxx' - end - it "can convert ubuntu-2404-xxx to ubuntu-noble-xxx" do @name = 'ubuntu-2404-xxx' expect(platform.with_version_codename).to be === 'ubuntu-noble-xxx' @@ -103,26 +93,6 @@ module Beaker expect(platform.with_version_codename).to be === 'ubuntu-focal-xxx' end - it "can convert ubuntu-1604-xxx to ubuntu-xenial-xxx" do - @name = 'ubuntu-1604-xxx' - expect(platform.with_version_codename).to be === 'ubuntu-xenial-xxx' - end - - it "can convert ubuntu-1310-xxx to ubuntu-saucy-xxx" do - @name = 'ubuntu-1310-xxx' - expect(platform.with_version_codename).to be === 'ubuntu-saucy-xxx' - end - - it "can convert ubuntu-12.10-xxx to ubuntu-quantal-xxx" do - @name = 'ubuntu-12.10-xxx' - expect(platform.with_version_codename).to be === 'ubuntu-quantal-xxx' - end - - it "can convert ubuntu-10.04-xxx to ubuntu-lucid-xxx" do - @name = 'ubuntu-10.04-xxx' - expect(platform.with_version_codename).to be === 'ubuntu-lucid-xxx' - end - %w[centos redhat].each do |p| it "leaves #{p}-7-xxx alone" do @name = "#{p}-7-xxx" @@ -132,24 +102,24 @@ module Beaker end context 'with_version_number' do - it "can convert debian-wheezy-xxx to debian-7-xxx" do - @name = 'debian-wheezy-xxx' - expect(platform.with_version_number).to be === 'debian-7-xxx' + it "can convert debian-bookworm-xxx to debian-12-xxx" do + @name = 'debian-bookworm-xxx' + expect(platform.with_version_number).to be === 'debian-12-xxx' end - it "can convert debian-squeeze-xxx to debian-6-xxx" do - @name = 'debian-squeeze-xxx' - expect(platform.with_version_number).to be === 'debian-6-xxx' + it "can convert debian-bullseye-xxx to debian-11-xxx" do + @name = 'debian-bullseye-xxx' + expect(platform.with_version_number).to be === 'debian-11-xxx' end - it "can convert ubuntu-saucy-xxx to ubuntu-1310-xxx" do - @name = 'ubuntu-saucy-xxx' - expect(platform.with_version_number).to be === 'ubuntu-1310-xxx' + it "can convert ubuntu-focal-xxx to ubuntu-2004-xxx" do + @name = 'ubuntu-focal-xxx' + expect(platform.with_version_number).to be === 'ubuntu-2004-xxx' end - it "can convert ubuntu-quantal-xxx to ubuntu-1210-xxx" do - @name = 'ubuntu-quantal-xxx' - expect(platform.with_version_number).to be === 'ubuntu-1210-xxx' + it "can convert ubuntu-jammy-xxx to ubuntu-2204-xxx" do + @name = 'ubuntu-jammy-xxx' + expect(platform.with_version_number).to be === 'ubuntu-2204-xxx' end %w[centos redhat].each do |p|