Commit Graph

179 Commits

Author SHA1 Message Date
Robey Pointer ac475d4a54 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-19]
2 keys needed for unit tests
2005-06-28 07:24:10 +00:00
Robey Pointer 727cab9672 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-17]
more unit tests
2005-06-28 06:02:44 +00:00
Robey Pointer 44239ae077 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-10]
fix stupid bug in kex_group1 which luckily only affected unit tests
2005-05-21 20:35:29 +00:00
Robey Pointer 366f216e3f [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-8]
add unit tests for the packetizer, and fix a little locking bug where i think more of the packetizer write function should be inside a lock
2005-05-10 17:36:38 +00:00
Robey Pointer 36055c5ac2 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-5]
split out Packetizer, fix banner detection bug, new unit test
split out a chunk of BaseTransport into a Packetizer class, which handles
the in/out packet data, ciphers, etc.  it didn't make the code any smaller
(transport.py is still close to 1500 lines, which is awful) but it did split
out a coherent chunk of functionality into a discrete unit.

in the process, fixed a bug that alain spineux pointed out: the banner
check was too forgiving and would block forever waiting for an SSH banner.
now it waits 5 seconds for the first line, and 2 seconds for each subsequent
line, before giving up.

added a unit test to test keepalive, since i wasn't sure that was still
working after pulling out Packetizer.
2005-05-01 08:04:59 +00:00
Robey Pointer 89ccac6bfa [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-163]
add SFTPClient.close()
add SFTPClient.close() and add a simple little unit test for it.
2005-04-18 00:30:52 +00:00
Robey Pointer 71a337ee08 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-157]
change SubsystemHandler/SFTPServerInterface API
change the API of SubsystemHandler to accept a reference to the
ServerInstance object during construction.  this will break all code
that currently creates subsystem handlers (like sftp servers) -- sorry!

lots of little doc fixups (mostly indenting).
2005-04-06 07:24:28 +00:00
Robey Pointer fead211c5c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-154]
even better 1.2 lapras
re-bump the version # to 1.2 (with a new date since i added more stuff).
add 2005 to the copyright date in a bunch of files.
2005-02-28 08:06:08 +00:00
Robey Pointer 7490172401 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-153]
tweak sftp_file write behavior on large blocks of data
BufferedFile.write() wasn't correctly dealing with the possibility that the
underlying write might not write the entire data block at once (even though
the docs said it would).  now that it's working, make sftp_file take
advantage of it in order to chop up blocks larger than 32kB (the max allowed
on sftp) and add a unit test for it.
2005-02-28 07:49:56 +00:00
Robey Pointer 2746d44906 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-152]
little doc fixes
stupid little doc fixups that didn't fit with the other patches.
2005-02-28 07:17:21 +00:00
Robey Pointer e915dccc7d [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-148]
forgot to check in stub_sftp
yikes! don't forget to check this in: needed for unit tests.
2005-02-26 21:12:43 +00:00
Robey Pointer fb2d7bbddd [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-146]
raise better exception on empty key
raise a clearer exception when trying to create an empty key.
2005-02-15 15:48:47 +00:00
Robey Pointer 0d10322783 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-143]
fix an sftp unit test
fix one of the sftp unit tests to actually work.
2005-02-06 23:30:40 +00:00
Robey Pointer 811f2bf30f [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-136]
loopback sftp test
add ability to turn off more tests, and a secret (for now) -X option to do
the sftp tests via loopback socket.  added another symlink sftp test to see
what happens with absolute symlinks.
2004-12-19 19:56:48 +00:00
Robey Pointer b2eb38483c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-133]
unit test madness
add some more testy bits and fix up some other bits.
2004-12-13 07:32:14 +00:00
Robey Pointer 97eca767a2 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-128]
more unit tests
added unit tests for multi-part auth, exec_command, and invoke_shell.
2004-12-12 09:38:24 +00:00
Robey Pointer 767d739299 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-123]
clean up authentication
add new exception "BadAuthenticationType", which is raised when auth fails
because your auth type (password or public-key) isn't valid on the server.

used this as an excuse to clean up auth_password and auth_publickey so their
'event' arg is optional, and if missing, they block until auth is finished,
raising an exception on error.

also, don't close the session on failed auth -- the server may let you try
again.

added some test cases for failed auth.
2004-12-11 03:43:18 +00:00
Robey Pointer 73a0df1df3 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-122]
symlink, readlink
add support for symlink command, and finish support for readlink.  (i guess
i started readlink a while ago but forgot to add the right method to the
SFTPServerInterface class.)
2004-12-10 08:30:44 +00:00
Robey Pointer 0ab2735dd4 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-102]
add key exchange tests + 1 more sftp test
add test suite for key-exchange protocols, since i apparently broke the
"gex" protocol recently and never noticed.  also add an sftp unit test for
mkdir/rmdir.
2004-11-07 02:08:11 +00:00
Robey Pointer 6caf15b425 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-94]
start testing Transport
the beginnings of tests for Transport.  only the bare minimum is there right
now.

also started doc'ing things up to ivysaur.
2004-10-20 16:52:51 +00:00
Robey Pointer e1639180f9 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-92]
add rsa/dss key object unit tests
add tests for rsa/dss key objects -- yay!
2004-09-25 22:07:59 +00:00
Robey Pointer ec3df4cc0d [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-91]
fix test.py to use options instead of env vars, sftp tests default off
fix up the test framework so that the sftp unit tests aren't always run (you
have to ask for them explicitly) and they take their configuration from
command-line options.  they still require a remote server.
2004-09-25 22:03:48 +00:00
Robey Pointer 3e644a94f1 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-88]
add Message.rewind()
add rewind() method to Message, which just resets the pointer so you can
start reading from the beginning again.  this is useful for some tests.
2004-09-25 21:32:53 +00:00
Robey Pointer 0737ea2ca4 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-86]
unit tests for Message
spanking new unit tests for Message.  i'm trying to fix the embarrassment
of having so little of paramiko testable.  next up is Transport!
2004-09-11 21:01:32 +00:00
Robey Pointer 0e96d4a7e2 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-81]
more unit tests
add test for BufferedFile.read(-1) and sftp.normalize().
2004-09-11 20:37:59 +00:00
Robey Pointer 1144a5d3d9 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-57]
more unit tests
add a unit test for sending a large (1MB) file with line buffering but no
linefeeds (this triggered several bugs and inefficiencies), and another test
to verify that the write buffer is flushed on seek.
2004-06-10 17:35:30 +00:00
Robey Pointer 4d30633457 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-55]
add an sftp unit test for making 100 files
create 100 files on the remote server, set their mode with chmod, then verify
that they're all there and contain the right data.  valeriy is reporting that
sometimes he's getting stuck after 20 and though i'm not seeing it, i want to
add a test to try to pin it down.
2004-05-29 18:58:11 +00:00
Robey Pointer 945a41dd3d [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-42]
support py22, more or less
add roger binns' patches for supporting python 2.2.  i hedged a bit on the
logging stuff and just added some trickery to let logging be stubbed out for
python 2.2.  this changed a lot of import statements but i managed to avoid
hacking at any of the existing logging.

socket timeouts are required for the threads to notice when they've been
deactivated.  worked around it by using the 'select' module on py22.

also fixed the sftp unit tests to cope with a password-protected private key.
2004-04-06 08:16:02 +00:00
Robey Pointer 14f2193d39 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-32]
add unit tests
add unit tests for BufferedFile and SFTP (it's a start).  remove the demo sftp
client because it was 99% copied from the other demos, which makes it kinda
confusing.  the unit tests are a much better example.
2004-03-08 17:54:19 +00:00