Commit Graph

18 Commits (dadee5dc05a706b61eb506b27faa98e06b94f9f0)

Author SHA1 Message Date
David Wilson 85934d101f tests: ensure strace is available in the docker image..
..and enable privileged=True since that's needed for ptrace()
7 years ago
Alex Willmer 110eba05ce Import and use unittest2 without aliasing it 7 years ago
Alex Willmer fdccf6a891 Replace custom assertContains() with unitest2 assertIn() 7 years ago
Alex Willmer 9351a44784 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 8fb0234176 Prevent MacOS exception on shutdown of closed socket. 7 years ago
David Wilson f1660d5011 tests: initial first_stage_test. 7 years ago
David Wilson 2e8ed68609 Merge branch 'pr/50' 7 years ago
Alex Willmer a0fbe99be0 testlib: Wait for sshd before running tests
On Ubuntu 17.10 something (probably Docker) appears to be accepting
connections, before sshd is fully ready. This results in a race
condition, and hence connection errors for the first few tests (2-3 on
my laptop).

testlib.wait_for_port() checks not only that the port can be connected
to, but also something resembling the sshd banner is sent.

Fixes #51
7 years ago
Alex Willmer cae6989932 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
David Wilson 397ff50a58 Try to be compatible with older Docker daemons; (hopefully) closes #46 7 years ago
David Wilson e3b51de6b1 Handle docker running on localhost. 7 years ago
David Wilson 2ed39c411f Allow call_function_test to succeed depite testlib import. 7 years ago
David Wilson 031c0f3cf4 issue #20: TestCase subclass with a nicer assertRaises 7 years ago
David Wilson d9bf091e6f Simple working fakessh_test. 7 years ago
David Wilson a89c20e54e Fixup some more tests. 7 years ago
David Wilson bc437733e5 Working DockerMixin for tests. 7 years ago
David Wilson 10c0dca24c Apply package rename to tests 7 years ago
David Wilson 66f92ad44c Initial couple of tests. 8 years ago