Commit Graph

26 Commits (6fb3a76e68d3e6f54500a971dc7e17b3306c4879)

Author SHA1 Message Date
David Wilson 9fe14e841c parent: reap the child process if connection fails
For example if no response is received in :attr:`connect_timeout`
seconds, the child would be left running.
6 years ago
David Wilson 41d2661ecb tests: fix sudo rule order. 6 years ago
David Wilson 6614d17021 tests: explicit sudo rules to require password from sudo_nopw
This account is used on Travis. It needs to be forced to type passwords
in some cases
6 years ago
David Wilson ba8022424b tests: more work to standardize user accounts. 6 years ago
David Wilson ce6fb05d87 tests: 'fix' responder test.
Needs a complete rewrite, but this will do for now.
6 years ago
David Wilson f203a91e1a tests: support CentOS Docker images.
- namespace & document test accounts in README.md
- standardize the password format everywhere, and ensure the passwords
  differ everywhere.
- Add MITOGEN_TEST_DISTRO environment variable.
6 years ago
Alex Willmer 48623763d6 minimize_source: Implement reindentation 6 years ago
Alex Willmer 556ee2aec6 minimize_source: Handling indentation
In the case that string(s) are replaced, any indent or dedent tags must
be re-inserted after the replacemnts.
6 years ago
Alex Willmer 36c5ff1d05 minimize_source: Make comments test invariant on hashbang/coding handling
strip_comments() currently ignores comments on lines 1 and 2, in order
to preserve lines such as

The comments test had normal comments on those lines, hence it was
failing.
6 years ago
Alex Willmer 35ae4e4227 Issue #160: Add minimize_source testcases 6 years ago
Alex Willmer e3b700b553 tests: Fix no such option -o running FakeSsh.test_okay()
Full output of failed test

```
ERROR: test_okay (__main__.FakeSshTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/ssh_test.py", line 16, in test_okay
    ssh_path=testlib.data_path('fakessh.py'),
  File "/home/alex/src/mitogen/mitogen/master.py", line 650, in ssh
    return self.connect('ssh', **kwargs)
  File "/home/alex/src/mitogen/mitogen/parent.py", line 463, in connect
    return self._connect(context_id, klass, name=name, **kwargs)
  File "/home/alex/src/mitogen/mitogen/parent.py", line 449, in _connect
    stream.connect()
  File "/home/alex/src/mitogen/mitogen/ssh.py", line 104, in connect
    super(Stream, self).connect()
  File "/home/alex/src/mitogen/mitogen/parent.py", line 395, in connect
    self._connect_bootstrap()
  File "/home/alex/src/mitogen/mitogen/ssh.py", line 116, in
_connect_bootstrap
    time.time() + 10.0):
  File "/home/alex/src/mitogen/mitogen/parent.py", line 207, in
iter_read
    (''.join(bits)[-300:],)
mitogen.core.StreamError: EOF on stream; last 300 bytes received:
'Usage: fakessh.py [options]\n\nfakessh.py: error: no such option: -o\n'
```
6 years ago
Alex Willmer 4fb1b928b7 Adjust unittest for master -> parent split
Tests should now match changes in
4d31300dd0
6 years ago
David Wilson b2909ee5f4 Replace nasty print statements in six_brokenpkg. 6 years ago
Alex Willmer 3831ac360f Replace all calls to file() with open()
Although these are synonyms in Python 2.x, when using MyPy to typecheck
code use of file() causes spurious errors.

This commit also serves as one small step to Python 3.x compatibility,
since 3.x removes the file() builtin.
6 years ago
David Wilson 15bf0f54e2 Beginnings of module_finder_test 6 years ago
David Wilson 750e9fab24 Make log_to_file accept string level rather than logging package constant
Saves an import, pain in the ass to type all the time.
6 years ago
David Wilson 1411790f56 master: make write_all() handle O_NONBLOCK and deadlines. 6 years ago
David Wilson db225638f0 core: Make iter_read() handle deadline (and non-blocking IO) properly 6 years ago
David Wilson c67119501b Keep allocate_id() in the enhanced router class. 6 years ago
David Wilson 4720eb1c55 core: add ALLOCATE_ID message for fakessh. 6 years ago
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.
6 years ago
David Wilson e2d3ac9b6a Fixup some more tests. 6 years ago
David Wilson 91ff12f8d8 Import Docker build script for integration tests 6 years ago
David Wilson 1f99dcb435 fix unbelievably dumb variable shadowing 6 years ago
David Wilson 25e4724bac A few more mitogen.slave/master changes 6 years ago
David Wilson e7ff6259a3 Initial commit. 6 years ago