Commit Graph

551 Commits

Author SHA1 Message Date
David Wilson 2a365aa9b0 Replace `with_context` parameter with mitogen.core.takes_econtext decorator 2018-03-19 21:35:35 +05:45
David Wilson 8d4005c264 fakessh: fix non-master context ID allocation. 2018-03-19 21:35:35 +05:45
David Wilson bd8001d481 fakessh: Fix NameError. 2018-03-19 21:35:35 +05:45
David Wilson e7c70127bf fakessh: return child exit status 2018-03-19 21:35:35 +05:45
David Wilson 77b8d28c68 fakessh: Use local process's sys.executable. 2018-03-19 21:35:35 +05:45
David Wilson 175fe7a4e1 fakessh: IoPump() doesn't need Process reference. 2018-03-19 21:35:35 +05:45
David Wilson 8dad396e27 Make subsystem requests die with a useful error. 2018-03-19 21:35:35 +05:45
David Wilson 4244a4609c Reduce CHUNK_SIZE to paper over a hang with rsync 2018-03-19 21:35:35 +05:45
David Wilson c67119501b Keep allocate_id() in the enhanced router class. 2018-03-19 21:35:35 +05:45
David Wilson 02a37d2339 Fix format string. 2018-03-19 21:35:35 +05:45
David Wilson 4720eb1c55 core: add ALLOCATE_ID message for fakessh. 2018-03-19 21:35:35 +05:45
David Wilson e796487cca core: allow sending 0-byte messages. 2018-03-19 21:35:35 +05:45
David Wilson 6f2d514813 Import unused images. 2018-03-19 21:35:35 +05:45
David Wilson 78d5575d4e Fix proxy connection: pickling changes broke it. 2018-03-19 21:35:35 +05:45
David Wilson b809d43865 Move more docstrings out of core.py. 2018-03-19 21:35:35 +05:45
David Wilson 918edf5145 Add TODO 2018-03-19 21:35:35 +05:45
David Wilson 502266f115 Fix Channel constructor and add simple test; closes #32 2018-03-19 21:35:35 +05:45
David Wilson 4f50707b82 core: support takes_econtext and takes_router decorators. 2018-03-19 21:35:35 +05:45
David Wilson 3a0f03183c Simple working fakessh_test. 2018-03-19 21:35:35 +05:45
David Wilson 76e476dcfa Tidy up logging of command lines for easier cutpaste. 2018-03-19 21:35:35 +05:45
David Wilson 498f961488 Fix up a few more ssh_tests, stop sending 400 modules over network.
Defining functions in the current module was causing the entirety of
py.test and all dependencies to be sucked in.
2018-03-19 21:35:35 +05:45
David Wilson f04a503caa Add rsync and git to build_docker_image too. 2018-03-19 21:35:35 +05:45
David Wilson e2d3ac9b6a Fixup some more tests. 2018-03-19 21:35:35 +05:45
David Wilson e66590f098 Initial version of ModuleFinder, but it's slooooow. 2018-03-19 21:35:35 +05:45
David Wilson 53467d394d Log forwarded events just as the docs suggest they're logged. 2018-03-19 21:35:35 +05:45
David Wilson 025954af32 Typo. 2018-03-19 21:35:35 +05:45
David Wilson d28cd4e2cf issue #31: move error log to ticket.
Original commit:

commit 3535e45245
Author: David Wilson <dw@botanicus.net>
Date:   Fri Aug 26 19:35:09 2016 +0100

    Broken SSH unit test.

A  todo/six-module-import-error.py
2018-03-19 21:35:35 +05:45
David Wilson 6b9e46ecd6 Add subheading to describe each import hack. 2018-03-19 21:35:35 +05:45
David Wilson 36f0584087 Link to six bug. 2018-03-19 21:35:35 +05:45
David Wilson 6ff2a49f10 Pad out shame.rst. 2018-03-19 21:35:35 +05:45
David Wilson bc49bccac6 Add instructions for running tests. 2018-03-19 21:35:35 +05:45
David Wilson 2736592c79 First handful of functional tests for SSH against Docker. 2018-03-19 21:35:34 +05:45
David Wilson dc446f9042 ssh: Learn to type passwords and supply pubkeys.
Now ssh requires a tty allocation. This presents a scalability problem,
a future version could selectively allocate a tty only if typing
passwords is desired.

Sudo's tty handling is now moved into mitogen.master.
2018-03-19 21:35:34 +05:45
David Wilson fa427d83c8 Tidy. 2018-03-19 21:35:34 +05:45
David Wilson 3cf75c9f2b Add more dependencies to dev_requirements.txt. 2018-03-19 21:35:34 +05:45
David Wilson 38a9482860 Add hacks to allow Mock to be imported. 2018-03-19 21:35:33 +05:45
David Wilson 91ff12f8d8 Import Docker build script for integration tests 2018-03-19 21:35:17 +05:45
David Wilson b51e41edb5 Working DockerMixin for tests. 2018-03-19 21:35:17 +05:45
David Wilson 5b4f9bd863 Fixup ansible_demo.py for recent Ansibles 2018-03-19 21:35:17 +05:45
David Wilson 1f99dcb435 fix unbelievably dumb variable shadowing 2018-03-19 21:35:17 +05:45
David Wilson 25e4724bac A few more mitogen.slave/master changes 2018-03-19 21:35:17 +05:45
David Wilson 708b742a9c Mention git. 2018-03-19 21:35:17 +05:45
David Wilson 4e8b9ecb27 ssh: Support disabling strict host key checking. 2018-03-19 21:35:17 +05:45
David Wilson 559b88ff12 ssh: Support specifying the port too. 2018-03-19 21:35:17 +05:45
David Wilson bdf4fcfbce Tidy up test. 2018-03-19 21:35:17 +05:45
David Wilson be9e55fe8c pickle: support Context(), use same unpickler everywhere.
* Support passing Context() objects in function calls and return values.
  Now the fakessh demo from the documentation index would work
  correctly.

* Since slaves can communicate with each other now, they should also use
  the same approach to unpickling as the master already used. Collapse
  away all the unpickle extension crap and hard-wire just the 3 types
  that support unpickling.
2018-03-19 21:35:17 +05:45
David Wilson 11acc031a9 pickle: Prevent access to the _Dead and CallError constructors
This should be pretty much identical the same behaviour as before, but
the extra assertion makes me feel happier.
2018-03-19 21:35:17 +05:45
David Wilson 92ae866271 Import random old test scripts into tests/ dir. 2018-03-19 21:35:17 +05:45
David Wilson 996d847731 Add some broken tests 2018-03-19 21:35:17 +05:45
David Wilson e75f1d8579 Add call_function_test, fix various exception bugs. 2018-03-19 21:35:17 +05:45