Dev guide: add notes about different image types for integration and unit/sanity tests (#68663)

* Dev guide: add notes about different image types for integration and unit/sanity tests
* Update docs/docsite/rst/dev_guide/testing_integration.rst

Co-authored-by: Matt Clay <matt@mystile.com>
This commit is contained in:
Andrew Klychkov 2020-04-07 17:17:44 +03:00 committed by GitHub
parent 13aef3c2e5
commit 598ead965d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -64,7 +64,7 @@ outside of those test subdirectories. They will also not reconfigure or bounce
.. note:: Running integration tests within Docker .. note:: Running integration tests within Docker
To protect your system from any potential changes caused by integration tests, and to ensure a sensible set of dependencies are available we recommend that you always run integration tests with the ``--docker`` option. See the `list of supported docker images <https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_data/completion/docker.txt>`_ for options. To protect your system from any potential changes caused by integration tests, and to ensure a sensible set of dependencies are available we recommend that you always run integration tests with the ``--docker`` option, for example ``--docker centos8``. See the `list of supported docker images <https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_data/completion/docker.txt>`_ for options (the ``default`` image is used for sanity and unit tests, as well as for platform independent integration tests such as those for cloud modules).
.. note:: Avoiding pulling new Docker images .. note:: Avoiding pulling new Docker images

View file

@ -18,6 +18,10 @@ All available tests are run unless the ``--test`` option is used.
How to run How to run
========== ==========
.. note::
To run sanity tests using docker, always use the default docker image
by passing the ``--docker`` or ``--docker default`` argument.
.. code:: shell .. code:: shell
source hacking/env-setup source hacking/env-setup

View file

@ -23,6 +23,10 @@ structure of the tests matches that of ``lib/ansible/``.
Running Tests Running Tests
============= =============
.. note::
To run unit tests using docker, always use the default docker image
by passing the ``--docker`` or ``--docker default`` argument.
The Ansible unit tests can be run across the whole code base by doing: The Ansible unit tests can be run across the whole code base by doing:
.. code:: shell .. code:: shell