Skip to content

Commit

Permalink
Merge pull request #255 from mhashizume/PA-6510/main/beaker-6
Browse files Browse the repository at this point in the history
Add support for Beaker 6
  • Loading branch information
mhashizume authored May 28, 2024
2 parents 9dbca23 + 001d37b commit 936881b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 27 deletions.
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

0 comments on commit 936881b

Please sign in to comment.