Summary
When using tox-ansible version 26.3.0 for integration and unit tests on a collection which has collection dependencies specifically for tests only, tox-ansible does not discover and automatically install them.
For example, using the common locations for a requirements.yml file in the tests/ directory in a collection, as documented in the Ansible Lint docs:
tests/requirements.yml
tests/integration/requirements.yml
tests/unit/requirements.yml
tox-ansible ideally should automatically discover these requirements.yml file for unit and integration tests and install the collection dependencies via ade prior to running integration and unit tests.
Here is a current workaround:
[testenv]
commands_pre =
unit: bash -c "ade install --requirement tests/unit/requirements.yml --no-seed --im none . || true"
This would provide a more seamless testing experience with tox-ansible.
Summary
When using
tox-ansibleversion26.3.0for integration and unit tests on a collection which has collection dependencies specifically for tests only,tox-ansibledoes not discover and automatically install them.For example, using the common locations for a
requirements.ymlfile in thetests/directory in a collection, as documented in the Ansible Lint docs:tox-ansibleideally should automatically discover theserequirements.ymlfile for unit and integration tests and install the collection dependencies viaadeprior to running integration and unit tests.Here is a current workaround:
This would provide a more seamless testing experience with
tox-ansible.