Skip to content

Commit

Permalink
Merge pull request #46 from voxpupuli/typo
Browse files Browse the repository at this point in the history
fail if datacenter/datastore could not be found
  • Loading branch information
bastelfreak authored May 2, 2024
2 parents 9ee1e20 + 0ad790f commit 6ea017d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/beaker/hypervisor/vsphere_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def find_vms(names, connection = @connection)
end

def find_datastore(dc, datastorename)
datacenter = @connection.serviceInstance.find_datacenter(dc)
datacenter.find_datastore(datastorename)
datacenter = @connection.serviceInstance.find_datacenter(dc) || raise("datacenter #{dc} not found")
datacenter.find_datastore(datastorename) || raise("datastore #{datastorename} not found in datacenter #{dc}")
end

def find_folder(dc, foldername)
Expand Down

0 comments on commit 6ea017d

Please sign in to comment.