1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst
Matt Clay 789218c215 Initial ansible-test sanity docs. (#26775)
* Rename no-iterkeys test for consistency.

* Require docs for all ansible-test sanity tests.

* Initial ansible-test sanity docs.

* Fix capitalization of Python.

* Fix sanity code smell test false positives.

* Fix another code-smell false positive.
2017-07-14 14:24:45 +01:00

36 lines
1.4 KiB
ReStructuredText

Sanity Tests » integration-aliases
==================================
Each integration test must have an ``aliases`` file to control test execution.
If the tests cannot be run as part of CI (requires external services, unsupported dependencies, etc.),
then they most likely belong in ``test/integration/roles/`` instead of ``test/integration/targets/``.
In that case, do not add an ``aliases`` file. Instead, just relocate the tests.
In some cases tests requiring external resources can be run as a part of CI.
This is often true when those resources can be provided by a docker container.
However, if you think that the tests should be able to be supported by CI, please discuss test
organization with @mattclay or @gundalow on GitHub or #ansible-devel on IRC.
If the tests can be run as part of CI, you'll need to add an appropriate CI alias, such as:
- ``posix/ci/group1``
- ``windows/ci/group2``
The CI groups are used to balance tests across multiple jobs to minimize test run time.
Using the relevant ``group1`` entry is fine in most cases. Groups can be changed later to redistribute tests.
Aliases can also be used to express test requirements:
- ``needs/privileged``
- ``needs/root``
- ``needs/ssh``
Other aliases are used to skip tests under certain conditions:
- ``skip/freebsd``
- ``skip/osx``
- ``skip/python3``
Take a look at existing ``aliases`` files to see what aliases are available and how they're used.