Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fedora 40, OracleLinux 9, Rocky 9 #342

Merged
merged 4 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system CentOS 7

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system CentOS 8

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Fedora 36

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Fedora 37

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Fedora 38

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system RedHat 7
"name": "puppet-yum",
"version": "7.1.1-rc0",
"author": "Vox Pupuli",
Expand Down 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
Loading