Staging instance, all changes can be removed at any time

Skip to content

docker/tests: rework and improve fixture usage in conftest.py, and use compose v2 if available

namely:

  • use testinfra's host to run commands instead of subprocess mostly for the sake of consistency.

  • use 'compose v2' command if available instead of the old 'docker-compose' tool.

    See https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command

  • simplify docker_compose fixture usage a bit

    make it yield the docker_host on which a check_compose_output lambda has been added; this allows users of the docker_compose fixture to use it directly to run compose commands in addition to usual commands without having to explicitly use the compose_cmd fixture.


Migrated from D8225 (view on Phabricator)

Merge request reports

Loading