Commit Graph

59 Commits (a39169ff16797d3eac929cf39fdb2da8cf06dbdb)

Author SHA1 Message Date
David Wilson 0e6de532de [stream-refactor] fix testlib assertion format string 5 years ago
David Wilson bd80d4b0af [stream-refactor] avoid os.wait3() for Py2.4. 5 years ago
David Wilson 300f8b2ff9 ansible: fixturize creation of MuxProcess
This relies on the previous commit resetting global variables.

Update clean_shutdown() to handle duplicate calls, due to tests
repeatedly installing it.
5 years ago
David Wilson 9c38093aa7 issue #482: tests: check for zombie process after test. 5 years ago
David Wilson bf77d4ab1d testlib: have LogCapturer.raw() return unicode on 2.x. 5 years ago
David Wilson f6d26c5acb testlib: disable lsof warnings due to Docker crap 5 years ago
David Wilson 2f29f3e8e6 tests: rearrange test modules again, they're used in multiple places
They're back on sys.path.
6 years ago
David Wilson c1db0d3858 issue #590: move example modules to module_finder/, fix/add tests 6 years ago
David Wilson 18b984a0b4 issue #535: activate Corker on 2.4 in master too. 6 years ago
David Wilson 0aa4c9d8fc issue #542: .ci: move some tests to Azure and enable Mac job. 6 years ago
David Wilson 9f10695ee2 issue #477: Popen.terminate() polyfill for Py2.4. 6 years ago
David Wilson 83aff538b3 issue #477: testlib: Py2.4 did not have BaseException. 6 years ago
David Wilson 4388e794ce issue #477: Py2.4: enumerate() may return stopped threads. 6 years ago
David Wilson 2ead451277 issue #477: Python 2.4 lacked str.partition. 6 years ago
David Wilson 2ec19f2374 issue #477: Python 2.4 lacked Thread.name. 6 years ago
David Wilson 2f016b5c7b issue #477: Python 2.4 lacked context managers. 6 years ago
David Wilson 9da6e6a9a8 tests: don't call Router.shutdown() twice.
Due to 497234e7 / issue #456.
6 years ago
David Wilson 3206d59c87 issue #426: teach DockerMixin to allow selecting interpreter 6 years ago
David Wilson 4b61e5af02 tests: run FD and thread checks on every test case.
Trying to hunt down weirdness on Azure.
6 years ago
David Wilson 27a4001f4f tests: handle NameError when faulthandler is not installed. 6 years ago
David Wilson e01c8f2891 issue #406: 3.x syntax fixes. 6 years ago
David Wilson 3da4b1a420 tests: verify only main/watcher threads exist at teardown 6 years ago
David Wilson b0dd628f07 issue #406: parent_test fixes, NameError in log_fd_calls(). 6 years ago
David Wilson 6ff1e001da issue #406: log socketpair calls too. 6 years ago
David Wilson 9b3cb55a8b issue #4096: import log_fd_calls() helper. 6 years ago
David Wilson 8a0b343760 issue #406: test for FD leak after every TestCase 6 years ago
David Wilson 53d882dcbd tests: activate faulthandler if available 6 years ago
David Wilson 592d6fc8d3 tests: fix CaptureStreamHandler on 2.6. 6 years ago
David Wilson 9d070541d9 ansible: try to create tempdir if missing.
Closes #358.
6 years ago
David Wilson 46ec0ffcaf tests: log original traceback in assertRaises(). 6 years ago
David Wilson 6cbf34d5fe tests: another smattering of 3.x type/API fixes. 6 years ago
David Wilson 410016ff47 Initial Python 3.x port work.
* ansible: use unicode_literals everywhere since it only needs to be
  compatible back to 2.6.
* compat/collections.py: delete this entirely and rip out the parts of
  functools that require it.
* Introduce serializable Kwargs dict subclass that translates keys to
  Unicode on instantiation.
* enable_debug_logging() must set _v/_vv globals.
* cStringIO does not exist in 3.x.
* Treat IOLogger and LogForwarder input as latin-1.
* Avoid ResourceWarnings in first stage by explicitly closing fps.
* Fix preamble_size.py syntax errors.
6 years ago
David Wilson 6e0883f369 issue #275: tests: fix bug in 2.6 compat check_output(), ignore it for >2.6. 7 years ago
David Wilson 3b1cc3676c issue #275: ssh_debug_level=3 for tests 7 years ago
David Wilson 38d69a6ecd issue #275: tests: drop docker client dep, doesn't run on 2.6. 7 years ago
David Wilson 7d9b7eec0c tests: must wrap log_to_file() in is_master
Without it, end up with a billion loggers attached in some tests
7 years ago
David Wilson 6109de51a0 tests: Ansible SSH timeout test
Also change Docker image to new 'mitogen' organization.
7 years ago
David Wilson d4d4f46006 tests: update check_host_keys parameter style in testlib. 7 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.
7 years ago
David Wilson 35fdd97f9a issue #164: utility to print Docker hostname for use from shell scripts. 7 years ago
David Wilson 40b978c9b7 core: Fix source verification.
Previously:

* src_id could be spoofed
* auth_id was checked but the message was still delivered!
7 years ago
David Wilson 1ff27ada49 Add maximum message size checks. Closes #151. 7 years ago
David Wilson 03fcf057dd tests: just call log_to_file() from testlib
Now we can run test.sh with MITOGEN_LOG_LEVEL=debug and things just
work.
7 years ago
David Wilson ec1de4b4b9 tests: ensure strace is available in the docker image..
..and enable privileged=True since that's needed for ptrace()
7 years ago
Alex Willmer 7e01c5bed5 Import and use unittest2 without aliasing it 7 years ago
Alex Willmer df9556d1d9 Replace custom assertContains() with unitest2 assertIn() 7 years ago
Alex Willmer 17da6e9998 Use unittest2 in all tests
This allows using features such as TestCase,assertIsInstance on Python
2.6 and earlier.
7 years ago
R W H Bricheno df61f6ab4d Prevent MacOS exception on shutdown of closed socket. 7 years ago
David Wilson 65defaa354 tests: initial first_stage_test. 7 years ago
Alex Willmer 8dcfb1b7f7 testlib: Auto negotiate Docker API version
Ubuntu 17.04 provides Docker 1.12.6, which has API version 1.24.
`dev_requirements.txt` specifies the docker-py 2.5.1, which by default
requests API version 1.30.

Hence when the SSH unit tests try to run the container specified in
`DockerizedSshDaemon` an error occurs

```
APIError: 400 Client Error: Bad Request ("client is newer than server
(client API version: 1.30, server API version: 1.24)")
```
7 years ago