tox-test¶
Overview¶
This action runs ansible-test within tox, enabling testing across multiple Ansible versions using isolated environments.
The tox configuration¶
This action generates a tox configuration file named .andebox-tox-test.ini in the current directory.
That file is not overwritten nor updated by andebox when it already exists.
If you need something not supported by the existing file, you will need to update it manually.
On the other hand, if you have not customized the file, you can safely delete it to regenerate it.
The tox environments are expected to:
have some version of
ansible-corebe able to run
andebox- the generated file will allowandeboxas an external command, so if it is available outside tox, it will be available inside the tox environments as well.
Parameters¶
The following parameters are supported:
--env,-eTox environments to run the test in (for example
ac216,dev).--list,-lList all tox environments (equivalent to
tox -a).--recreate,-rForce recreation of virtual environments (equivalent to
tox -r).
After these parameters, you will usually want to pass -- and after that, any
parameters you wish to use with ansible-test. See examples below.
Dependencies¶
toxwill have been installed as a dependency ofandebox.ansible-coreandandeboxmust be available in the tox environments.
Usage Examples¶
andebox tox-test --env ac217,ac218 -- sanity --docker default plugins/modules/mymodule.py
andebox tox-test --list
andebox tox-test --recreate -- units --docker default
Known Issues¶
The generated
.andebox-tox-test.iniis not overwritten if it already exists.