From 3d8b2e938b528bede9598b4636dc3f2bf5389a85 Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Wed, 20 Sep 2023 20:52:25 -0700 Subject: [PATCH] acceptance tests: replace deprecated install_module_from_forge install_module_from_forge is from the deprecated gem https://github.com/voxpupuli/beaker-module_install_helper/ which was replaced by https://github.com/voxpupuli/beaker_puppet_helpers. --- .sync.yml | 2 +- spec/acceptance/class_spec.rb | 2 -- spec/spec_helper_acceptance.rb | 12 ++++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.sync.yml b/.sync.yml index e295ca9c..4cf442c8 100644 --- a/.sync.yml +++ b/.sync.yml @@ -2,4 +2,4 @@ spec/spec_helper.rb: mock_with: ':mocha' spec/spec_helper_acceptance.rb: - unmanaged: false + unmanaged: true diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index 617554ff..eda53722 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -6,10 +6,8 @@ case fact('os.family') when 'RedHat' pkg_cmd = 'yum info nodejs | grep "^From repo"' - install_module_from_forge('puppet-epel', '>= 3.0.0 < 4.0.0') when 'Debian' pkg_cmd = 'dpkg -s nodejs | grep "^Maintainer"' - install_module_from_forge('puppetlabs-apt', '>= 4.4.0 < 9.0.0') end context 'default parameters' do diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 2681792e..669ccaff 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -1,10 +1,14 @@ # frozen_string_literal: true -# Managed by modulesync - DO NOT EDIT -# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ - require 'voxpupuli/acceptance/spec_helper_acceptance' -configure_beaker(modules: :metadata) +configure_beaker do |host| + case fact('os.family') + when 'Debian' + install_puppet_module_via_pmt_on(host, 'puppetlabs-apt') + when 'RedHat' + install_puppet_module_via_pmt_on(host, 'puppet-epel') + end +end Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f }