From 5842ea04e4168837d314143ed309ee643a572f7e Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Tue, 10 Dec 2024 20:09:23 +0800 Subject: [PATCH 1/4] Sort supported OSes --- metadata.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/metadata.json b/metadata.json index ecf17a6..a234177 100644 --- a/metadata.json +++ b/metadata.json @@ -26,17 +26,16 @@ ], "operatingsystem_support": [ { - "operatingsystem": "RedHat", + "operatingsystem": "AlmaLinux", "operatingsystemrelease": [ - "7", "8", "9" ] }, { - "operatingsystem": "Rocky", + "operatingsystem": "Amazon", "operatingsystemrelease": [ - "8" + "2017" ] }, { @@ -48,10 +47,11 @@ ] }, { - "operatingsystem": "Scientific", + "operatingsystem": "Fedora", "operatingsystemrelease": [ - "7", - "8" + "36", + "37", + "38" ] }, { @@ -61,30 +61,30 @@ ] }, { - "operatingsystem": "VirtuozzoLinux", + "operatingsystem": "RedHat", "operatingsystemrelease": [ - "7" + "7", + "8", + "9" ] }, { - "operatingsystem": "Amazon", + "operatingsystem": "Rocky", "operatingsystemrelease": [ - "2017" + "8" ] }, { - "operatingsystem": "AlmaLinux", + "operatingsystem": "Scientific", "operatingsystemrelease": [ - "8", - "9" + "7", + "8" ] }, { - "operatingsystem": "Fedora", + "operatingsystem": "VirtuozzoLinux", "operatingsystemrelease": [ - "36", - "37", - "38" + "7" ] } ], From 07c39a73fba46875d5cfff2833a6ad6dcb26ab0d Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Tue, 10 Dec 2024 20:20:02 +0800 Subject: [PATCH 2/4] Add new supported OSes * Fedora 40 * OracleLinux 9 * Rocky 9 --- metadata.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/metadata.json b/metadata.json index a234177..6b510b9 100644 --- a/metadata.json +++ b/metadata.json @@ -51,13 +51,15 @@ "operatingsystemrelease": [ "36", "37", - "38" + "38", + "40" ] }, { "operatingsystem": "OracleLinux", "operatingsystemrelease": [ - "8" + "8", + "9" ] }, { @@ -71,7 +73,8 @@ { "operatingsystem": "Rocky", "operatingsystemrelease": [ - "8" + "8", + "9" ] }, { From 265a7b2002dca443d8a47247fc42f11e58489462 Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Thu, 12 Dec 2024 15:08:17 +0800 Subject: [PATCH 3/4] Replace COPR in acceptance tests `copart/restic` has no builds for Fedora 40 (and no builds in last 2 years). Tests are switched to more active nucleo/wget COPR instead. --- spec/acceptance/copr_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/acceptance/copr_spec.rb b/spec/acceptance/copr_spec.rb index fd7512c..e4c3a3d 100644 --- a/spec/acceptance/copr_spec.rb +++ b/spec/acceptance/copr_spec.rb @@ -3,11 +3,11 @@ require 'spec_helper_acceptance' describe 'yum::copr' do - context 'when @caddy/caddy and copart/restic are enabled' do + context 'when @caddy/caddy and nucleo/wget are enabled' do # Using puppet_apply as a helper it 'must work idempotently with no errors' do pp = <<-PUPPET - yum::copr { ['@caddy/caddy', 'copart/restic']: } + yum::copr { ['@caddy/caddy', 'nucleo/wget']: } PUPPET # Run it twice and test for idempotency @@ -16,16 +16,16 @@ end describe command('dnf copr list') do - its(:stdout) { is_expected.to match(%r{^copr.fedorainfracloud.org/copart/restic$}) } + its(:stdout) { is_expected.to match(%r{^copr.fedorainfracloud.org/nucleo/wget$}) } its(:stdout) { is_expected.to match(%r{^copr.fedorainfracloud.org/group_caddy/caddy$}) } end end - context 'when copart/restic is disabled' do + context 'when nucleo/wget is disabled' do # Using puppet_apply as a helper it 'must work idempotently with no errors' do pp = <<-PUPPET - yum::copr { ['@caddy/caddy', 'copart/restic']: + yum::copr { ['@caddy/caddy', 'nucleo/wget']: ensure => 'disabled', } PUPPET @@ -36,16 +36,16 @@ end describe command('dnf copr list') do - its(:stdout) { is_expected.to match(%r{^copr.fedorainfracloud.org/copart/restic \(disabled\)$}) } + its(:stdout) { is_expected.to match(%r{^copr.fedorainfracloud.org/nucleo/wget \(disabled\)$}) } its(:stdout) { is_expected.to match(%r{^copr.fedorainfracloud.org/group_caddy/caddy \(disabled\)$}) } end end - context 'when copart/restic is removed' do + context 'when nucleo/wget is removed' do # Using puppet_apply as a helper it 'must work idempotently with no errors' do pp = <<-PUPPET - yum::copr { ['@caddy/caddy', 'copart/restic']: + yum::copr { ['@caddy/caddy', 'nucleo/wget']: ensure => 'removed', } PUPPET @@ -56,7 +56,7 @@ end describe command('dnf copr list') do - its(:stdout) { is_expected.not_to match(%r{^copr.fedorainfracloud.org/copart/restic$}) } + its(:stdout) { is_expected.not_to match(%r{^copr.fedorainfracloud.org/nucleo/wget$}) } its(:stdout) { is_expected.not_to match(%r{^copr.fedorainfracloud.org/group_caddy/caddy$}) } end end From 2e5537f384cbfb8812509402c481c9af45e683c0 Mon Sep 17 00:00:00 2001 From: Yury Bushmelev Date: Thu, 12 Dec 2024 15:42:46 +0800 Subject: [PATCH 4/4] Fix unit tests on Rocky 9 --- spec/classes/init_spec.rb | 49 +++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 55e09fc..6357578 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -82,12 +82,8 @@ resilient-storage-source rt ] - case facts[:os]['release']['major'] - when '8' - it { is_expected.to have_yumrepo_resource_count(15) } - else - it { is_expected.to have_yumrepo_resource_count(0) } # rubocop:disable RSpec/RepeatedExample - end + + it { is_expected.to have_yumrepo_resource_count(15) } when 'CentOS' case facts[:os]['release']['major'] when '9' @@ -315,7 +311,7 @@ updates-testing-source ] else - it { is_expected.to have_yumrepo_resource_count(0) } # rubocop:disable RSpec/RepeatedExample + it { is_expected.to have_yumrepo_resource_count(0) } end context 'and the CentOS base repo is negated' do @@ -560,28 +556,25 @@ ] end when 'Rocky' - case facts[:os]['release']['major'] - when '8' - it { is_expected.to have_yumrepo_resource_count(15) } + it { is_expected.to have_yumrepo_resource_count(15) } - it_behaves_like 'a catalog containing repos', %w[ - appstream - appstream-source - baseos - baseos-source - devel - extras - ha - ha-source - nfv - plus - powertools - powertools-source - resilient-storage - resilient-storage-source - rt - ] - end + it_behaves_like 'a catalog containing repos', %w[ + appstream + appstream-source + baseos + baseos-source + devel + extras + ha + ha-source + nfv + plus + powertools + powertools-source + resilient-storage + resilient-storage-source + rt + ] when 'Fedora' it { is_expected.to have_yumrepo_resource_count(11) }