Revision 5f7fd34c
Added by Lukas Zapletal over 8 years ago
test/tftp/tftp_test.rb | ||
---|---|---|
end
|
||
|
||
def test_paths_inside_tftp_directory_dont_raise_errors
|
||
::Proxy::HttpDownloads.stubs(:start_download).returns(true)
|
||
::Proxy::HttpDownload.any_instance.stubs(:start).returns(true)
|
||
FileUtils.stubs(:mkdir_p).returns(true)
|
||
|
||
assert Proxy::TFTP.send(:fetch_boot_file,'/some/root/boot/file','http://localhost/file')
|
||
end
|
||
|
||
def test_paths_outside_tftp_directory_raise_errors
|
||
::Proxy::HttpDownloads.stubs(:start_download).returns(true)
|
||
::Proxy::HttpDownload.any_instance.stubs(:start).returns(true)
|
||
FileUtils.stubs(:mkdir_p).returns(true)
|
||
|
||
assert_raises RuntimeError do
|
Also available in: Unified diff
Fixes #11318 - HttpDownloads.start_download returns instance
instead of `true`. Allows to join processes, useful for discovery image
plugin.