Revision 0c3e15d2
Added by Ohad Levy over 12 years ago
- ID 0c3e15d210a01b712b35ef07ccce31925ec08cd6
test/unit/orchestration/dhcp_test.rb | ||
---|---|---|
h = hosts(:one)
|
||
assert h.valid?
|
||
assert h.dhcp?
|
||
assert_instance_of Net::DhcpRecord, h.dhcp_record
|
||
assert_instance_of Net::DHCP::Record, h.dhcp_record
|
||
end
|
||
end
|
||
|
||
... | ... | |
Resolv::DNS.any_instance.stubs(:getaddress).with("brsla01.yourdomain.net").returns("2.3.4.5").once
|
||
#User.current = users(:admin)
|
||
result = h.os.jumpstart_params h, h.model.vendor_class
|
||
assert_equal result, {"<Sun-Fire-V210>install_path" => "/vol/solgi_5.10/sol10_hw0910_sparc",
|
||
"<Sun-Fire-V210>install_server_ip" => "2.3.4.5",
|
||
"<Sun-Fire-V210>install_server_name" => "brsla01",
|
||
"<Sun-Fire-V210>jumpstart_server_path" => "2.3.4.5:/vol/jumpstart",
|
||
"<Sun-Fire-V210>root_path_name" => "/vol/solgi_5.10/sol10_hw0910_sparc/Solaris_10/Tools/Boot",
|
||
"<Sun-Fire-V210>root_server_hostname" => "brsla01",
|
||
"<Sun-Fire-V210>root_server_ip" => "2.3.4.5",
|
||
"<Sun-Fire-V210>sysid_server_path" => "2.3.4.5:/vol/jumpstart/sysidcfg/sysidcfg_primary"
|
||
}
|
||
assert_equal result, {
|
||
:vendor => "<Sun-Fire-V210>",
|
||
:install_path => "/vol/solgi_5.10/sol10_hw0910_sparc",
|
||
:install_server_ip => "2.3.4.5",
|
||
:install_server_name => "brsla01",
|
||
:jumpstart_server_path => "2.3.4.5:/vol/jumpstart",
|
||
:root_path_name => "/vol/solgi_5.10/sol10_hw0910_sparc/Solaris_10/Tools/Boot",
|
||
:root_server_hostname => "brsla01",
|
||
:root_server_ip => "2.3.4.5",
|
||
:sysid_server_path => "2.3.4.5:/vol/jumpstart/sysidcfg/sysidcfg_primary"
|
||
}
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #1186 foreman does not forward sparc dhcp vendor options when creating a sparc Solaris host