Skip to content

Commit

Permalink
acceptance: don't try installing nodejs-devel on RedHat
Browse files Browse the repository at this point in the history
nodejs-devel is version 16.18, but nodejs is version 16.20, so dnf
won't allow them both to be installed.
  • Loading branch information
kenyon committed Sep 19, 2023
1 parent b2c278e commit e0ca227
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,19 @@
include_examples 'cleanup'

it_behaves_like 'an idempotent resource' do
# nodejs-devel (from EPEL) is currently not installable alongside nodejs
# (from appstream) due to differing versions.
nodejs_dev_package_ensure =
if fact('os.release.major') == '9'
'undef'
else
'installed'
end

let(:manifest) do
<<-PUPPET
class { 'nodejs':
nodejs_dev_package_ensure => installed,
nodejs_dev_package_ensure => #{nodejs_dev_package_ensure},
npm_package_ensure => installed,
repo_class => 'epel',
}
Expand All @@ -48,7 +57,10 @@ class { 'nodejs':
nodejs-devel
].each do |pkg|
describe package(pkg) do
it { is_expected.to be_installed }
it do

Check warning on line 60 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 - CentOS 9

nodejs RedHat with repo_class => epel Package "nodejs-devel" is expected to be installed Failure/Error: is_expected.to be_installed expected Package "nodejs-devel" to be installed

Check warning on line 60 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - CentOS 9

nodejs RedHat with repo_class => epel Package "nodejs-devel" is expected to be installed Failure/Error: is_expected.to be_installed expected Package "nodejs-devel" to be installed

Check warning on line 60 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 - OracleLinux 9

nodejs RedHat with repo_class => epel Package "nodejs-devel" is expected to be installed Failure/Error: is_expected.to be_installed expected Package "nodejs-devel" to be installed

Check warning on line 60 in spec/acceptance/class_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 - OracleLinux 9

nodejs RedHat with repo_class => epel Package "nodejs-devel" is expected to be installed Failure/Error: is_expected.to be_installed expected Package "nodejs-devel" to be installed
pending('nodejs-devel and nodejs not installable together on EL9') if fact('os.release.major') == '9' && pkg == 'nodejs-devel'
is_expected.to be_installed
end
end
end
end
Expand Down

0 comments on commit e0ca227

Please sign in to comment.