[PATCH] Fix ftp error
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 4 23:30:27 GMT 2006
Alexander Belchenko wrote:
> John Arbash Meinel пишет:
>
>> Do we have any ability to create an FTP server, so that we can test the
>> FTP functionality?
>
>
> I was trying to play with bzr and ftp operations on Windows with local
> ftp server (I use free Quick 'n Easy FTP Server 3.0 Lite) and I found
> that ftp implementation have a bunch of errors (at least on Windows) so
> it simply unusable. At least independent FTP clients works fine with
> mentioned FTP server.
>
> --
> Alexander
>
Well, the error that someone else reported means that it was probably
getting exceptions all the time, and probably couldn't do much of anything.
Which is why we need a test suite.
Actually, it would be moderately easy to do so as long as you have ftp
access to the local working directory.
Basically, you would just do something like:
class TestFTPTransport(TestCaseInTempDir, TestTransportMixIn):
def get_transport():
path = os.getcwdu()
return bzrlib.transport.get_transport('ftp://localhost/' + path)
Assuming that your ftp server would let you access the complete filesystem.
For testing purposes, it would probably be sufficient to munge the path
slightly to translate it into what the ftp server would recognize.
This won't work as a generic solution for bzr testing, since we really
need a built-in ftp server. But if someone wants to debug ftp, it would
probably be a good way to do it.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060104/794fb9d9/attachment.pgp
More information about the bazaar
mailing list