Skip to content

Commit

Permalink
acceptance tests: replace deprecated install_module_from_forge
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kenyon committed Sep 21, 2023
1 parent 048847e commit 3d8b2e9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
spec/spec_helper.rb:
mock_with: ':mocha'
spec/spec_helper_acceptance.rb:
unmanaged: false
unmanaged: true
2 changes: 0 additions & 2 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -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 }

0 comments on commit 3d8b2e9

Please sign in to comment.