Skip to content

Commit

Permalink
Fix unit tests on Rocky 9
Browse files Browse the repository at this point in the history
  • Loading branch information
jay7x committed Dec 12, 2024
1 parent 265a7b2 commit 2e5537f
Showing 1 changed file with 21 additions and 28 deletions.
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 2e5537f

Please sign in to comment.