Skip to content

Commit

Permalink
Add test case for ManageIQ::Providers::Vmware::InfraManager::Provisio…
Browse files Browse the repository at this point in the history
…nWorkflow#get_cpu_values_hash.

https://bugzilla.redhat.com/show_bug.cgi?id=1246994
  • Loading branch information
lfu committed Oct 1, 2015
1 parent aa7cfb6 commit bdcbcd7
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -76,5 +76,16 @@
)
workflow.make_request(request, values, alt_user.userid)
end

it '#get_cpu_values_hash' do
template = FactoryGirl.create(:template_vmware, :name => "test_template")
FactoryGirl.create(:hardware, :vm_or_template => template, :cores_per_socket => 4, :logical_cpus => 8, :numvcpus => 2)
wf = described_class.new({}, admin.userid)
result = wf.get_cpu_values_hash(template)

expect(result[:number_of_cpus]).to eq(8)
expect(result[:number_of_sockets]).to eq(2)
expect(result[:cores_per_socket]).to eq(4)
end
end
end

0 comments on commit bdcbcd7

Please sign in to comment.