Skip to content

Commit

Permalink
(BKR-1217) suppress enable_root on cygwin SUTs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevpl committed Oct 24, 2017
1 parent 24d91ab commit 1d95e1c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/beaker/hypervisor/vcloud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def provision
@vsphere_helper.find_vms(host['vmhostname'])[host['vmhostname']].summary.guest.ipAddress != nil
end
host[:ip] = @vsphere_helper.find_vms(host['vmhostname'])[host['vmhostname']].summary.guest.ipAddress
enable_root(host)
enable_root(host) unless host.is_cygwin?
end
end

Expand Down
19 changes: 19 additions & 0 deletions spec/beaker/hypervisor/vcloud_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,25 @@ module Beaker

end

it 'does not run enable_root on cygwin hosts' do
MockVsphereHelper.powerOff

opts = make_opts
opts[:pooling_api] = nil
opts[:datacenter] = 'testdc'

hosts = make_hosts
hosts.each do |host|
allow( host ).to receive( :is_cygwin? ).and_return( true )
end
vcloud = Beaker::Vcloud.new( hosts, opts )
allow( vcloud ).to receive( :require ).and_return( true )
allow( vcloud ).to receive( :sleep ).and_return( true )
expect( vcloud ).to receive( :enable_root ).never
vcloud.provision

end

end

describe "#cleanup" do
Expand Down

0 comments on commit 1d95e1c

Please sign in to comment.