Skip to content

Commit d456d2a

Browse files
committed
Configure host type as AIO
Previously, when running with beaker 5 and latest beaker-puppet, tests failed with: cannot add defaults of type pe for host redhat7-64-1 (add_pe_defaults_on not present) The error came from beaker-puppet when it tried to configure the host as a PE agent[1]. The root cause is beaker defaults its options to `pe`[2]. When `beaker-puppet` calls the `configure_type_defaults_on` method, it calls the appropriate `add_<type>_defaults_on` method. This works when using beaker 4 as `beaker-pe` is pulled in as a dependency and its `add_pe_defaults_on` method[3] is included into the tests. However, when running with beaker5, beaker-pe is not loaded, so the method is undefined. It appears beaker-puppet_install_helper is responsible for the whether beaker-pe is loaded or not, but only when using beaker-puppet_install_helper 0.9.4. Since these tests don't actually depend on PE, drop beaker-pe, require 'beaker-puppet' directly (so the install_from_build_data_url method exists) and configure the host type directly. [1] https://github.com/puppetlabs/beaker-puppet/blob/7175b5c1acb5cddb3a31ddcc114f09cddd3b83d0/lib/beaker-puppet/install_utils/puppet_utils.rb#L167 [2] https://github.com/voxpupuli/beaker/blob/c61ee381d3801bad70989d9b3cbf970771e6f330/lib/beaker/options/presets.rb#L139 [3] https://github.com/puppetlabs/beaker-pe/blob/3bfe913b8d57c805cc0c51ae899fff174224d5f5/lib/beaker-pe/install/pe_defaults.rb#L93
1 parent 429eecf commit d456d2a

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

.sync.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Gemfile:
1616
- gem: beaker-abs
1717
from_env: BEAKER_ABS_VERSION
1818
version: '~> 0.9'
19-
- gem: beaker-pe
2019
- gem: beaker-hostgenerator
2120
from_env: BEAKER_HOSTGENERATOR_VERSION
2221
- gem: beaker-rspec

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ group :development do
3838
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
3939
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.30')
4040
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.9')
41-
gem "beaker-pe", require: false
4241
gem "beaker-hostgenerator"
4342
gem "beaker-rspec"
4443
gem "beaker-puppet", *location_for(ENV['BEAKER_PUPPET_VERSION'] || '~> 1.22')

spec/spec_helper_acceptance.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'beaker-rspec'
2+
require 'beaker-puppet'
23
require 'beaker/module_install_helper'
34
require 'beaker/puppet_install_helper'
45
require 'voxpupuli/acceptance/spec_helper_acceptance'
@@ -98,6 +99,7 @@ def user_manifest(username, params = {})
9899
RSpec.configure do |c|
99100
c.before :suite do
100101
unless ENV['BEAKER_provision'] == 'no'
102+
hosts.each { |host| host[:type] = 'aio' }
101103
run_puppet_install_helper
102104
install_module_on(hosts_as('default'))
103105
install_module_dependencies_on(hosts)

0 commit comments

Comments
 (0)