Skip to content

Commit b3392e7

Browse files
samccannpatchback[bot]
authored andcommitted
Remove ansible-test sanity from local module development (#2034)
* Remove ansible-test sanity from local module development * Update docs/docsite/rst/dev_guide/developing_modules_general.rst (cherry picked from commit ef72400)
1 parent c21cbcd commit b3392e7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

docs/docsite/rst/dev_guide/developing_modules_general.rst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ It is highly recommended that you use a ``venv`` or ``virtualenv`` for Python de
3333

3434
To create a module:
3535

36-
1. Create a ``library`` directory in your workspace, your test play should live in the same directory.
36+
1. Create a ``library`` directory in your workspace. Your test play should live in the same directory.
3737
2. Create your new module file: ``$ touch library/my_test.py``. Or just open/create it with your editor of choice.
3838
3. Paste the content below into your new module file. It includes the :ref:`required Ansible format and documentation <developing_modules_documenting>`, a simple :ref:`argument spec for declaring the module options <argument_spec>`, and some example code.
3939
4. Modify and extend the code to do what you want your new module to do. See the :ref:`programming tips <developing_modules_best_practices>` and :ref:`Python 3 compatibility <developing_python_3>` pages for pointers on writing clean and concise module code.
@@ -142,23 +142,13 @@ You can easily run a full test by including it in a playbook, as long as the ``l
142142
Testing your newly-created module
143143
=================================
144144

145-
The following two examples will get you started with testing your module code. Please review our :ref:`testing <developing_testing>` section for more detailed
145+
Review our :ref:`testing <developing_testing>` section for more detailed
146146
information, including instructions for :ref:`testing module documentation <testing_module_documentation>`, adding :ref:`integration tests <testing_integration>`, and more.
147147

148148
.. note::
149149
If contributing to Ansible, every new module and plugin should have integration tests, even if the tests cannot be run on Ansible CI infrastructure.
150150
In this case, the tests should be marked with the ``unsupported`` alias in `aliases file <https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/integration-aliases.html>`_.
151151

152-
Performing sanity tests
153-
-----------------------
154-
155-
You can run through Ansible's sanity checks in a container:
156-
157-
``$ ansible-test sanity -v --docker --python 3.10 MODULE_NAME``
158-
159-
.. note::
160-
Note that this example requires Docker to be installed and running. If you'd rather not use a container for this, you can choose to use ``--venv`` instead of ``--docker``.
161-
162152

163153
Contributing back to Ansible
164154
============================

0 commit comments

Comments
 (0)