Skip to content

Bug: Ansible Integration and Unit Test Collection dependencies are not discovered automatically #550

@dbrennand

Description

@dbrennand

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions