Revision c7bb92a9
Added by Lukas Zapletal about 8 years ago
test/unit/orchestration/tftp_test.rb | ||
---|---|---|
assert h.interfaces.first.rebuild_tftp
|
||
end
|
||
|
||
def test_should_fail_rebuilding_when_template_is_missing
|
||
h = FactoryGirl.create(:host, :with_tftp_orchestration)
|
||
as_admin { h.update_attribute :operatingsystem, operatingsystems(:centos5_3) }
|
||
h.build = true
|
||
h.stubs(:provisioning_template).returns(nil)
|
||
refute h.interfaces.first.rebuild_tftp
|
||
assert_match /No PXELinux templates were found/, h.errors[:base].first
|
||
end
|
||
|
||
def test_should_fail_rebuild_tftp_with_exception
|
||
h = FactoryGirl.create(:host, :with_tftp_orchestration)
|
||
Nic::Managed.any_instance.expects(:setTFTP).raises(StandardError, 'TFTP rebuild failed')
|
Also available in: Unified diff
Fixes #14521 - better error on missing PXELinux template