Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FINE] Renderer fails when calling validate_import_vm #14934

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -31,7 +31,7 @@ def import_vm(source_vm_id, target_params)
end

def validate_import_vm
api_version >= '4.0'
highest_supported_api_version && highest_supported_api_version >= '4'
end

private
Expand Down
Expand Up @@ -54,4 +54,18 @@
)
end
end

context 'checks version during validation' do
let(:ems) { FactoryGirl.create(:ems_redhat) }

it 'validates successfully' do
allow(ems).to receive(:highest_supported_api_version).and_return('4')
expect(ems.validate_import_vm).to be_truthy
end

it 'validates before connecting' do
allow(ems).to receive(:highest_supported_api_version).and_return(nil)
expect(ems.validate_import_vm).to be_falsey
end
end
end