docs: refresh testing_integration.rst (#53338)

* docs: refresh testing_integration.rst

Ensures the examples can be run:
- fedora25 is not available anymore, use fedora29 instead
- the posix/ci alias does not exist anymore, use shippable/posix/ instead
- explain how to list the target without argcomplete

* ansible-test should be in $PATH
* call ansible-runner from bin/, not test/runner
* we don't use credentials.template anymore, we use a collection of .template files.
* low-case bash bc we refresh to name of the binary
* refresh the command of Windows-CI example
* Update docs/docsite/rst/dev_guide/testing_integration.rst

Co-Authored-By: goneri <goneri@lebouder.net>
pull/42482/head
Gonéri Le Bouder 6 years ago committed by Alicia Cozine
parent 8535c05b29
commit 6421e89e23

@ -25,15 +25,32 @@ It provides tab completion in ``bash`` for the ``ansible-test`` test runner.
Configuration
=============
ansible-test command
--------------------
The example below assumes ``bin/`` is in your ``$PATH``. An easy way to achieve that
is to initialize your environment with the ``env-setup`` command::
source hacking/env-setup
ansible-test --help
You can also call ``ansible-test`` with the full path::
bin/ansible-test --help
integration_config.yml
----------------------
Making your own version of ``integration_config.yml`` can allow for setting some
tunable parameters to help run the tests better in your environment. Some
tests (e.g. cloud) will only run when access credentials are provided. For
more information about supported credentials, refer to ``credentials.template``.
tests (e.g. cloud) will only run when access credentials are provided. For more
information about supported credentials, refer to the various ``cloud-config-*.template``
files in the ``test/integration/`` directory.
Prerequisites
=============
The tests will assume things like hg, svn, and git are installed and in path. Some tests
Some tests assume things like hg, svn, and git are installed, and in path. Some tests
(such as those for Amazon Web Services) need separate definitions, which will be covered
later in this document.
@ -55,15 +72,19 @@ outside of those test subdirectories. They will also not reconfigure or bounce
Run as follows for all POSIX platform tests executed by our CI system::
test/runner/ansible-test integration --docker fedora25 -v posix/ci/
ansible-test integration --docker fedora29 -v shippable/
You can target a specific tests as well, such as for individual modules::
ansible-test integration -v ping
You can select specific tests as well, such as for individual modules::
Use the following command to list all the available targets::
test/runner/ansible-test integration -v ping
ansible-test integration --list-targets
By installing ``argcomplete`` you can obtain a full list by doing::
.. note:: Bash users
test/runner/ansible-test integration <tab><tab>
If you use ``bash`` with ``argcomplete``, obtain a full list by doing: ``ansible-test integration <tab><tab>``
Destructive Tests
=================
@ -71,7 +92,7 @@ Destructive Tests
These tests are allowed to install and remove some trivial packages. You will likely want to devote these
to a virtual environment, such as Docker. They won't reformat your filesystem::
test/runner/ansible-test integration --docker fedora25 -v destructive/
ansible-test integration --docker fedora29 -v destructive/
Windows Tests
=============
@ -94,7 +115,7 @@ Define Windows inventory::
Run the Windows tests executed by our CI system::
test/runner/ansible-test windows-integration -v windows/ci/
ansible-test windows-integration -v shippable/
Tests in Docker containers
==========================
@ -113,12 +134,12 @@ Running Integration Tests
To run all CI integration test targets for POSIX platforms in a Ubuntu 16.04 container::
test/runner/ansible-test integration -v posix/ci/ --docker
ansible-test integration --docker ubuntu1604 -v shippable/
You can also run specific tests or select a different Linux distribution.
For example, to run tests for the ``ping`` module on a Ubuntu 14.04 container::
test/runner/ansible-test integration -v ping --docker ubuntu1404
ansible-test integration -v ping --docker ubuntu1404
Container Images
----------------

Loading…
Cancel
Save