From 598ead965dd0ed1db9a554e8a02c8fcc693ffdd8 Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Tue, 7 Apr 2020 17:17:44 +0300 Subject: [PATCH] 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 --- docs/docsite/rst/dev_guide/testing_integration.rst | 2 +- docs/docsite/rst/dev_guide/testing_sanity.rst | 4 ++++ docs/docsite/rst/dev_guide/testing_units.rst | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/dev_guide/testing_integration.rst b/docs/docsite/rst/dev_guide/testing_integration.rst index 7f3a594b652..ecd3c78fbe5 100644 --- a/docs/docsite/rst/dev_guide/testing_integration.rst +++ b/docs/docsite/rst/dev_guide/testing_integration.rst @@ -64,7 +64,7 @@ outside of those test subdirectories. They will also not reconfigure or bounce .. 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 `_ 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 `_ 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 diff --git a/docs/docsite/rst/dev_guide/testing_sanity.rst b/docs/docsite/rst/dev_guide/testing_sanity.rst index 7395d24e9fd..bdedd0a48c2 100644 --- a/docs/docsite/rst/dev_guide/testing_sanity.rst +++ b/docs/docsite/rst/dev_guide/testing_sanity.rst @@ -18,6 +18,10 @@ All available tests are run unless the ``--test`` option is used. 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 source hacking/env-setup diff --git a/docs/docsite/rst/dev_guide/testing_units.rst b/docs/docsite/rst/dev_guide/testing_units.rst index 9d7b26b2bc3..4cc07face0b 100644 --- a/docs/docsite/rst/dev_guide/testing_units.rst +++ b/docs/docsite/rst/dev_guide/testing_units.rst @@ -23,6 +23,10 @@ structure of the tests matches that of ``lib/ansible/``. 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: .. code:: shell