Skip to content

Commit

Permalink
WIP test connecting to live vcsim
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Aug 27, 2024
1 parent d48e65e commit 7b93c75
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions spec/models/manageiq/providers/vmware/infra_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,11 @@
end

context ".verify_credentials" do
let(:verify_params) { {"endpoints" => {"default" => {"hostname" => "vcenter"}}, "authentications" => {"default" => {"username" => "root", "password" => "vmware"}}} }
let(:verify_params) { {"endpoints" => {"default" => {"hostname" => "localhost", "port" => 8989}}, "authentications" => {"default" => {"username" => "root", "password" => "vmware"}}} }
let(:current_time) { Time.now.utc.to_s }
let(:is_virtual_center) { true }
let(:api_version) { '6.5.0' }

before do
miq_vim = double("VMwareWebService/MiqVim")
allow(miq_vim).to receive(:isVirtualCenter).and_return(is_virtual_center)
allow(miq_vim).to receive(:currentTime).and_return(current_time)
allow(miq_vim).to receive(:apiVersion).and_return(api_version)
allow(miq_vim).to receive(:disconnect)

require "VMwareWebService/MiqVim"
expect(MiqVim).to receive(:new).and_return(miq_vim)
end

context "virtual-center" do
it "is successful" do
expect(described_class.verify_credentials(verify_params)).to be_truthy
Expand Down

0 comments on commit 7b93c75

Please sign in to comment.