Revision 04327448
Added by Dominik Hlavac Duran about 5 years ago
test/models/compute_resources/vmware_test.rb | ||
---|---|---|
assert_equal host, as_admin { cr.associated_host(vm) }
|
||
end
|
||
|
||
test "#associated_host matches NIC mac with uppercase letters" do
|
||
host = FactoryBot.create(:host, :mac => 'ca:d0:e6:32:16:98')
|
||
Nic::Base.create! :mac => "ca:d0:e6:32:16:99", :host => host
|
||
host.reload
|
||
cr = FactoryBot.build_stubbed(:vmware_cr)
|
||
iface1 = mock('iface1', :mac => 'CA:D0:E6:32:16:98')
|
||
iface2 = mock('iface1', :mac => 'ca:d0:e6:32:16:99')
|
||
vm = mock('vm', :interfaces => [iface1, iface2])
|
||
assert_equal host, as_admin { cr.associated_host(vm) }
|
||
end
|
||
|
||
describe "vm_compute_attributes_for" do
|
||
before do
|
||
plain_attrs = {
|
Also available in: Unified diff
Fixes #16520 - Associating VM-mac is case sensitive