[rfc] [patch] sftp unit tests without ssh

John A Meinel john at arbash-meinel.com
Mon Jan 23 05:23:33 GMT 2006


Robert Collins wrote:
> On Sun, 2006-01-22 at 22:09 -0600, John A Meinel wrote:
>> Robey Pointer wrote:
>>> Here's a patch to add a subclass of SFTPServer (called
>>> SFTPServerWithoutSSH) that sets up a fake sftp server over loopback but
>>> uses a special ssh vendor ("loopback") which just wraps a plain socket
>>> instead of setting up both ends of an SSH Transport.  What this means is
>>> that tests using SFTPServerWithoutSSH will use sftp without all the
>>> overhead of actually setting up a secure channel.
>>>
>>> On my ibook, it drops the './bzr selftest' time from about 5 minutes to
>>> about 3 minutes -- pretty significant.
>>>
>>> We discussed having at least one test still use a full sftp-over-ssh
>>> setup.  I didn't do that because I'm not entirely sure how, but it
>>> should just be a matter of using SFTPServer for a test instead of
>>> SFTPServerWithoutSSH.
>> I think just a simple test where we create an SFTPServer, and then use
>> 't = get_transport('sftp://localhost')'.
>>
>> But I'm not sure where this would fit with Robert's adapting transports
>> stuff.
> 
> I haven't read the rest yet - just addressing this specific bit.
> 
> This sits as an internal-to-the-sftp-code test. I.e.
> bzrlib.tests.test_sftp.TestFullHandshaking.test_local_connection
> 
> or some such. The adapting tests are for verifing the correctness of the
> implementation; this test is to check that the ssh<->sftp piece that we
> are eliminating elsewhere works correctly - and as such is not part of
> the general interface behaviour.
> 
> Rob

I agree. I didn't think it would be part of the Transport test. I just
didn't know exactly how to write a test which uses a SFTPServer without
going through the adapter.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060122/0655eaef/attachment.pgp 


More information about the bazaar mailing list