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 support for Ubuntu 22.04 #483

Merged
merged 2 commits into from
Oct 27, 2023
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
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"20.04"
"20.04",
"22.04"
]
},
{
Expand Down
6 changes: 6 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
nodejs-devel
].each do |pkg|
describe package(pkg) do
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
Expand All @@ -66,6 +66,8 @@
end

context 'Debian distribution packages', if: fact('os.family') == 'Debian' do
before(:context) { purge_node }

include_examples 'cleanup'

it_behaves_like 'an idempotent resource' do
Expand All @@ -91,6 +93,8 @@
end

context 'set global_config_entry secret' do
before(:context) { purge_node }

include_examples 'cleanup'

it_behaves_like 'an idempotent resource' do
Expand All @@ -115,6 +119,8 @@
end

context 'set global_config_entry secret unquoted' do
before(:context) { purge_node }

include_examples 'cleanup'

it_behaves_like 'an idempotent resource' do
Expand Down
8 changes: 8 additions & 0 deletions spec/support/acceptance/purge.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

def purge_node
case fact('osfamily')
when 'Debian'
on default, 'apt-get purge -y libnode*', { acceptable_exit_codes: [0, 100] }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you purge things, libnodeXX remains on the system and conflicts with files from nodesource packages 🙄

end
end