From d9b161b5a95bb4d4fe3ad83c3000e9b752a20184 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 25 Sep 2023 09:22:57 +0200 Subject: [PATCH 1/2] Add support for Ubuntu 22.04 --- metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index e2ee030d..1418042d 100644 --- a/metadata.json +++ b/metadata.json @@ -51,7 +51,8 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "20.04" + "20.04", + "22.04" ] }, { From 127c6a178c001ffccdee50668cb05db95f6c35dc Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 27 Oct 2023 12:09:44 +0200 Subject: [PATCH 2/2] try harder to purge old node packages --- spec/acceptance/class_spec.rb | 6 ++++++ spec/support/acceptance/purge.rb | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 spec/support/acceptance/purge.rb diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index 92765f54..9e26e738 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -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 @@ -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 @@ -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 diff --git a/spec/support/acceptance/purge.rb b/spec/support/acceptance/purge.rb new file mode 100644 index 00000000..271a2a05 --- /dev/null +++ b/spec/support/acceptance/purge.rb @@ -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