diff --git a/docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst b/docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst index 4e143c3185..e0d0f3bd6a 100644 --- a/docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst +++ b/docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst @@ -25,6 +25,14 @@ They also improve efficiency by keeping tests with similar requirements running When selecting a group for a new test, use the same group as existing tests similar to the one being added. If more than one group is available, select one randomly. +Setup +----- + +Aliases can be used to execute setup targets before running tests: + +- ``setup/once/TARGET`` - Run the target ``TARGET`` before the first target that requires it. +- ``setup/always/TARGET`` - Run the target ``TARGET`` before each target that requires it. + Requirements ------------ @@ -33,6 +41,21 @@ Aliases can be used to express some test requirements: - ``needs/privileged`` - Requires ``--docker-privileged`` when running tests with ``--docker``. - ``needs/root`` - Requires running tests as ``root`` or with ``--docker``. - ``needs/ssh`` - Requires SSH connections to localhost (or the test container with ``--docker``) without a password. +- ``needs/httptester`` - Requires use of the http-test-container to run tests. + +Dependencies +------------ + +Some test dependencies are automatically discovered: + +- Ansible role dependencies defined in ``meta/main.yml`` files. +- Setup targets defined with ``setup/*`` aliases. +- Symbolic links from one target to a file in another target. + +Aliases can be used to declare dependencies that are not handled automatically: + +- ``needs/target/TARGET`` - Requires use of the test target ``TARGET``. +- ``needs/file/PATH`` - Requires use of the file ``PATH`` relative to the git root. Skipping -------- @@ -42,7 +65,7 @@ Aliases can be used to skip platforms using one of the following: - ``skip/freebsd`` - Skip tests on FreeBSD. - ``skip/osx`` - Skip tests on macOS. - ``skip/rhel`` - Skip tests on RHEL. -- ``skip/docker`` - Skip tests when running on a Docker container +- ``skip/docker`` - Skip tests when running in a Docker container. Platform versions, as specified using the ``--remote`` option with ``/`` removed, can also be skipped: @@ -61,6 +84,14 @@ For more fine grained skipping, use conditionals in integration test playbooks, when: ansible_distribution in ('Ubuntu') +Miscellaneous +------------- + +There are several other aliases available as well: + +- ``destructive`` - Requires ``--allow-destructive`` to run without ``--docker`` or ``--remote``. +- ``hidden`` - Target is ignored. Usable as a dependency. Automatic for ``setup_`` and ``prepare_`` prefixed targets. + Unstable --------