From 71db82b2dea63a2aa826bcd78445a9cc7bfe077c Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Tue, 28 May 2024 15:20:42 -0700 Subject: [PATCH 1/3] Update tests to drop end-of-life Debian, Ubuntu voxpupuli/beaker@064a340 removed support for end-of-life versions of both Debian and Ubuntu. This commit updates tests to reflect that. --- .../install_utils/foss_utils_spec.rb | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/spec/beaker-puppet/install_utils/foss_utils_spec.rb b/spec/beaker-puppet/install_utils/foss_utils_spec.rb index dad6b8d..99cd922 100644 --- a/spec/beaker-puppet/install_utils/foss_utils_spec.rb +++ b/spec/beaker-puppet/install_utils/foss_utils_spec.rb @@ -818,28 +818,6 @@ def logger subject.install_puppetlabs_release_repo_on(host) end end - - context 'on debian 8' do - let(:platform) { Beaker::Platform.new('debian-8-i386') } - it 'returns the correct url when repo is set to puppet4' do - expect(subject).to receive(:on).with(host, /puppet4-release-jessie\.deb$/).once - expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once - expect(subject).to receive(:on).with(host, 'apt-get update').once - subject.install_puppetlabs_release_repo_on(host, 'puppet4') - end - it 'returns the correct url when opts[:puppet_collection] is set to puppet7' do - expect(subject).to receive(:on).with(host, /puppet7-release-jessie\.deb$/).once - expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once - expect(subject).to receive(:on).with(host, 'apt-get update').once - subject.install_puppetlabs_release_repo_on(host, nil, { puppet_collection: 'puppet7' }) - end - it 'returns the correct url when both repo and opts[:puppet_collection] are nil' do - expect(subject).to receive(:on).with(host, /puppet-release-jessie\.deb$/).once - expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once - expect(subject).to receive(:on).with(host, 'apt-get update').once - subject.install_puppetlabs_release_repo_on(host) - end - end end describe '#install_puppetlabs_dev_repo' do @@ -1090,10 +1068,10 @@ def stub_uninteresting_portions_of_install_puppetlabs_dev_repo! version = '6.6.6' context 'on deb-based platform' do - let(:host) { make_host('master', platform: Beaker::Platform.new('ubuntu-16.04-amd64')) } - it 'munges the version on ubuntu 16.04' do + let(:host) { make_host('master', platform: Beaker::Platform.new('ubuntu-24.04-amd64')) } + it 'munges the version on ubuntu 24.04' do expect(subject).to receive(:install_puppetlabs_release_repo_on).with(host, 'puppet', anything) - expect(subject).to receive(:install_package).with(host, 'puppetserver', "#{version}-1xenial") + expect(subject).to receive(:install_package).with(host, 'puppetserver', "#{version}-1noble") allow(subject).to receive(:dev_builds_accessible_on?).with(host, anything).and_return false subject.install_puppetserver_on(host, version: version) end From ec831cdd7118d98f903b575c5499987feaccb2a4 Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Tue, 28 May 2024 15:21:08 -0700 Subject: [PATCH 2/3] Update test to remove end-of-life operating system voxpupuli/beaker@a451a61 dropped support for Arista EOS. As EOS is no longer supported by Beaker at all anymore, this test raises an ArgumentError, instead of a RuntimeError. This commit updates the test to reference FreeBSD, a platform still supported by Beaker. --- spec/beaker-puppet/install_utils/foss_utils_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/beaker-puppet/install_utils/foss_utils_spec.rb b/spec/beaker-puppet/install_utils/foss_utils_spec.rb index 99cd922..b9d16b1 100644 --- a/spec/beaker-puppet/install_utils/foss_utils_spec.rb +++ b/spec/beaker-puppet/install_utils/foss_utils_spec.rb @@ -920,7 +920,7 @@ def stub_uninteresting_portions_of_install_puppetlabs_dev_repo! end it 'fails correctly for systems not accounted for' do - @platform = 'eos-1-3' + @platform = 'freebsd-1-3' expect { subject.install_packages_from_local_dev_repo(host, package_name) }.to raise_error RuntimeError end end From 001d37b4fa81614e1af2b9e23a769b40d8b8d476 Mon Sep 17 00:00:00 2001 From: Michael Hashizume Date: Tue, 28 May 2024 09:27:22 -0700 Subject: [PATCH 3/3] Add support for Beaker 6 --- beaker-puppet.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beaker-puppet.gemspec b/beaker-puppet.gemspec index c51d04e..4a7f2a0 100644 --- a/beaker-puppet.gemspec +++ b/beaker-puppet.gemspec @@ -29,6 +29,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'beaker-vmpooler', '~> 1.4' # Run time dependencies - s.add_runtime_dependency 'beaker', '~> 5.0' + s.add_runtime_dependency 'beaker', '~> 6.0' s.add_runtime_dependency 'oga', '~> 3.4' end