Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Beaker 6 #255

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beaker-puppet.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
30 changes: 4 additions & 26 deletions spec/beaker-puppet/install_utils/foss_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -942,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
Expand Down Expand Up @@ -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
Expand Down