Revision 05848084
Added by Timo Goebel about 8 years ago
test/unit/orchestration/dhcp_test.rb | ||
---|---|---|
i = FactoryGirl.build(:nic_managed, :ip => '10.0.0.10', :name => 'eth0:0')
|
||
i.host = h
|
||
i.domain = domains(:mydomain)
|
||
i.subnet = FactoryGirl.build(:subnet, :dhcp, :boot_mode => 'Static', :ipam => 'Internal DB')
|
||
i.subnet = FactoryGirl.build(:subnet_ipv4, :dhcp, :boot_mode => 'Static', :ipam => 'Internal DB')
|
||
refute i.dhcp?
|
||
end
|
||
end
|
||
... | ... | |
|
||
test "provision interface DHCP records should contain filename/next-server attributes" do
|
||
ProxyAPI::TFTP.any_instance.expects(:bootServer).returns('192.168.1.1')
|
||
subnet = FactoryGirl.build(:subnet, :dhcp, :tftp)
|
||
subnet = FactoryGirl.build(:subnet_ipv4, :dhcp, :tftp)
|
||
h = FactoryGirl.create(:host, :with_dhcp_orchestration, :with_tftp_orchestration, :subnet => subnet)
|
||
assert_equal 'pxelinux.0', h.provision_interface.dhcp_record.filename
|
||
assert_equal '192.168.1.1', h.provision_interface.dhcp_record.nextServer
|
Also available in: Unified diff
fixes #14638 - Refactor Subnet into STI to allow different subnet types