Skip to content

Commit

Permalink
(MAINT) fix spec testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kevpl committed Dec 5, 2016
1 parent 52e3060 commit 9dc8b8d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/beaker-pe/install/pe_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ def do_higgs_install host, opts

#wait for output to host['higgs_file']
#we're all done when we find this line in the PE installation log
if version_is_less(options[:pe_ver] || host['pe_ver'], '2016.3')
if version_is_less(opts[:pe_ver] || host['pe_ver'], '2016.3')
higgs_re = /Please\s+go\s+to\s+https:\/\/.*\s+in\s+your\s+browser\s+to\s+continue\s+installation/m
else
higgs_re = /o\s+to\s+https:\/\/.*\s+in\s+your\s+browser\s+to\s+continue\s+installation/m
Expand Down
19 changes: 13 additions & 6 deletions spec/beaker-pe/install/pe_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,11 @@ def slice_installer_options(host)

it 'sets puppet-agent acceptable_exit_codes correctly for config helper on upgrade' do
hosts = make_hosts({
:previous_pe_ver => '3.0',
:pe_ver => '4.0',
:roles => ['agent'],
}, 2)
:previous_pe_ver => '3.0',
:pe_ver => '4.0',
:pe_upgrade_ver => '4.0',
:roles => ['agent'],
}, 2)
hosts[0][:roles] = ['master', 'database', 'dashboard']
hosts[1][:platform] = Beaker::Platform.new('el-6-x86_64')
opts[:HOSTS] = {}
Expand Down Expand Up @@ -893,8 +894,14 @@ def slice_installer_options(host)
allow( subject ).to receive( :create_remote_file ).with( hosts[0], /answers/, /q/ )
#run installer on all hosts
allow( subject ).to receive( :on ).with( hosts[0], /puppet-enterprise-installer/ )
allow( subject ).to receive( :install_puppet_agent_pe_promoted_repo_on ).with( hosts[1],
{:puppet_agent_version=>nil, :puppet_agent_sha=>nil, :pe_ver=>hosts[1][:pe_ver], :puppet_collection=>nil} )
allow( subject ).to receive(
:install_puppet_agent_pe_promoted_repo_on
).with( hosts[1], {
:puppet_agent_version => nil,
:puppet_agent_sha => nil,
:pe_ver => hosts[1][:pe_ver],
:puppet_collection => nil
} )
# expect( subject ).to receive( :on ).with( hosts[2], /puppet-enterprise-installer/ ).once
hosts.each do |host|
allow( subject ).to receive( :add_pe_defaults_on ).with( host ) unless subject.aio_version?(host)
Expand Down

0 comments on commit 9dc8b8d

Please sign in to comment.