Skip to content

Commit

Permalink
Merge pull request #483 from voxpupuli/ubuntu22
Browse files Browse the repository at this point in the history
Add support for Ubuntu 22.04
  • Loading branch information
bastelfreak authored Oct 27, 2023
2 parents 3597082 + 127c6a1 commit ff1fd3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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 @@ -66,6 +66,8 @@ class { 'nodejs':
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 @@ class { 'nodejs':
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 @@ class { 'nodejs': }
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] }
end
end

0 comments on commit ff1fd3f

Please sign in to comment.