compose/tests
Ben Thorner a6b602d086 Support attaching to dependencies on up
When using the 'up' command, only services listed as arguments are
attached to, which can be very different to the 'no argument' case
if a service has many and deep dependencies:

   - It's not clear when dependencies have failed to start. Have to run
'compose ps' separately to find out.
   - It's not clear when dependencies are erroring. Have to run 'compose
logs' separately to find out.

With a simple setup, it's possible to work around theses issue by
using the 'up' command without arguments. But when there are lots of
'top-level' services, with common dependencies, in a single config,
using 'up' without arguments isn't practical due to resource limits
and the sheer volume of output from other services.

This introduces a new '--attach-dependencies' flag to optionally attach
dependent containers as part of the 'up' command. This makes their logs
visible in the output, alongside the listed services. It also means we
benefit from the '--abort-on-container-exit' behaviour when dependencies
fail to start, giving more visibility of the failure.

Signed-off-by: Ben Thorner <ben.thorner@digital.cabinet-office.gov.uk>
2020-01-16 13:41:54 +00:00
..
acceptance Support attaching to dependencies on up 2020-01-16 13:41:54 +00:00
fixtures Support attaching to dependencies on up 2020-01-16 13:41:54 +00:00
integration Use stdlib modules instead of deprecated pytest fixtures 2020-01-09 07:01:44 +01:00
unit Support attaching to dependencies on up 2020-01-16 13:41:54 +00:00
__init__.py Update pre-commit config to enforace that future imports exist in all files. 2016-01-07 13:09:03 -05:00
helpers.py Implement custom context manager for changing CWD 2020-01-09 06:55:28 +01:00