Skip to content

Commit

Permalink
Merge pull request #4 from kevpl/bkr1217_cygwin_disable_root
Browse files Browse the repository at this point in the history
(BKR-1217) suppress enable_root on cygwin SUTs
  • Loading branch information
tvpartytonight authored Oct 24, 2017
2 parents 24d91ab + 1d95e1c commit 02fc5cf
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 02fc5cf

Please sign in to comment.