Skip to content

Commit

Permalink
Merge pull request #342 from jay7x/add_oses
Browse files Browse the repository at this point in the history
Add Fedora 40, OracleLinux 9, Rocky 9
  • Loading branch information
bastelfreak authored Dec 12, 2024
2 parents 1a12f8e + 2e5537f commit 3080021
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 56 deletions.
41 changes: 22 additions & 19 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@
],
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystem": "AlmaLinux",
"operatingsystemrelease": [
"7",
"8",
"9"
]
},
{
"operatingsystem": "Rocky",
"operatingsystem": "Amazon",
"operatingsystemrelease": [
"8"
"2017"
]
},
{
Expand All @@ -48,43 +47,47 @@
]
},
{
"operatingsystem": "Scientific",
"operatingsystem": "Fedora",
"operatingsystemrelease": [
"7",
"8"
"36",
"37",
"38",
"40"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"8"
"8",
"9"
]
},
{
"operatingsystem": "VirtuozzoLinux",
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7"
"7",
"8",
"9"
]
},
{
"operatingsystem": "Amazon",
"operatingsystem": "Rocky",
"operatingsystemrelease": [
"2017"
"8",
"9"
]
},
{
"operatingsystem": "AlmaLinux",
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"8",
"9"
"7",
"8"
]
},
{
"operatingsystem": "Fedora",
"operatingsystem": "VirtuozzoLinux",
"operatingsystemrelease": [
"36",
"37",
"38"
"7"
]
}
],
Expand Down
18 changes: 9 additions & 9 deletions spec/acceptance/copr_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
49 changes: 21 additions & 28 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) }

Expand Down

0 comments on commit 3080021

Please sign in to comment.