[PATCH] Add support for filezilla server

John Arbash Meinel john at arbash-meinel.com
Tue Oct 9 19:09:05 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Blake Winton wrote:
> Martin Pool wrote:
>> On 10/7/07, Gary van der Merwe <garyvdm at gmail.com> wrote:
>>> Unfortunately to be able to test this, you would need to have a
>>> filezilla server installed. The other suggestion was to test that
>>> _translate_perm_error returns the correct error with certain
>>> parameters passed to it. I feel that this is testing that the code
>>> does what it does, and not what it is meant to do.
>>> I'm not sure where to proceed from here. Any suggestions welcome.
>>
>> I can't see any good middle ground either: testing it against the real
>> server is impractical, and just testing that this function detects the
>> message is too trivial.  So I'm going to just merge this.
> 
> Could someone with access to a filezilla server write some sort of
> Mock-filezilla transport which doesn't connect to a back-end, but
> instead returns the responses that a real filezilla server would return?
> 
> (I've done this for some of my personal projects, and it's been
> complicated, but it has worked...)
> 
> Later,
> Blake.

Well, you could adapt our testing ftp server (which uses Medusa). I
don't think it would be terribly hard to hack the error strings.

But there could always be a bit of drift versus the real filezilla (what
happens if they decide they need clearer error messages, etc.). I
suppose it still gives a reasonable point of entry.

Then again, I'm fine with just merging the fix, and not worrying too
much about the details. We at least have a comment about what server is
using that error string. And it has an annotation of:

  Correctly detect a NoSuchFile when using a filezilla server.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHC8PAJdeBCYSNAAMRAtQ3AJ4of3sFZckwfu2QMFUoVeXi0P5gbACfcA08
KdOuawro951NgLdietpKSUk=
=hwv2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list