summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-doc/library (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update triple single quotes to triple double quotes (#84099)Matt Clay2024-10-0912-68/+68
| | | | | | | | | * Update triple single quotes to triple double quotes This change was fully automated. The updated Python files have been verified to tokenize the same as the originals, except for the expected change in quoting of strings, which were verified through literal_eval. * Manual conversion of docstring quotes
* Require `from __future__ import annotations` (#81902)Matt Clay2023-10-0516-32/+16
|
* refactor and fixes for doc parsing (#77719)Brian Coca2022-09-013-0/+49
| | | | | | | | | | | | | | | * refactor and remove redundant code in documentation allow location and building api to be more accessible fix issues with displaying ansible.legacy and ansible.builtin ensure we don't x2 process tokens (some modules reference them also) fixes #77764 move to constants vs hardcoded more informative errors and comments now have actual filter/test plugins, which expose the filter/test functions moved filter/test loading/finding logic into jinja2pluginloader, removed dupe implementations added tests for case in which we unique by basename when listing Update lib/ansible/utils/plugin_docs.py Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
* Add ansible-doc tests for documentation containing YAML anchors (#70436)Sloane Hertel2020-07-071-0/+71
| | | Co-authored-by: Tadej Borovšak <tadej.borovsak@xlab.si>
* ansible-doc man formatter: fail with better error message when description ↵Felix Fontein2020-07-061-0/+40
| | | | | | | isn't there (#70046) * ansible-doc man formatter: do not crash when description isn't there. * Change to report a better error message when description is not there. * Add test.
* Plugin/module docs: parse return values, add collection names in them ↵Felix Fontein2020-06-112-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (version_added_collection), and format them nicely in ansible-doc (#69796) * Tag return value docs if they are a dict (and not str/None). * Try to parse return docs as YAML. * Properly dump return values in ansible-doc. * Adjust plugin formatter. * Add changelog fragment. * Don't add 'default' for return values. * Fix plugin_formatter. * Only try to parse return docs if they are still a string. * Add tests. * Warn if RETURN cannot be parsed. * Adjust tests. Also test for warning. * if -> elif (otherwise EXAMPLE will be parsed too). * Always parse return documentation, and fail if it is invalid YAML. * Polishing. * Mostly re-enable ansible-doc tests. Listing from the local collection seems to be somewhat broken. I assume this is why the test was disabled. * Lint and make tests work with Python 2. * Keep FQCNs in plugins (not modules), i.e. restore previous state.
* Support `removed_at_date` in ansible-doc (#70002)Nilashish Chakraborty2020-06-111-0/+40
| | | | | | | | | | | | | | | | | | * Support removed_at_date in ansible-doc Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> Changes: * ansible-doc does not support `removed_at_date` and assumes that deprecated dict will either have `removed_in` or `version`. This results in ansible-doc (and hence "sanity --test=ansible-doc") failing for modules having only `removed_at_date`. * This patch adds support for `removed_at_date` and also gives it precedence over `removed_in` or `version`. * Add tests and changelog Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
* ansible-doc: properly handle suboptions (#69795)Felix Fontein2020-06-081-0/+70
| | | * Specifically handle suboptions, contains, etc in ansible-doc.
* Nuke all removed_module stubs (#67139)Matt Martz2020-02-051-15/+0
| | | | | | * Nuke all removed_module stubs * Remove ignores and botmeta entry
* WIP - Fix ansible-doc bugs and add integration tests. (#62461)Matt Clay2019-09-1811-0/+291
* Add integration tests for ansible-doc. * Enable tests that now pass * Cleanup processing of plugin docs * Mostly separate the steps of processing plugin docs 1) Acquire source data 2) Transform and calculate additonal data 3) Format data for output 4) Output data format_plugin_doc() is still mixing transformation and formatting but that should be fixed in a devel-only change * Raise exceptions in _get_plugin_doc() on errors. * Remove check to exclude on blacklisted extensions. We already request only .py files * If there is no DOCUMENTATION entry in the plugin, raise an exception from _get_plugin_doc(). Everywhere we use _get_plugin_doc(), this is treated as an error * If there is no ANSIBLE_METADATA raise an exception as well as displaying of docs assumes that this has been set. * If there is neither DOCUMENTATION nor ANSIBLE_METADATA, warn about the lack of METADATA and error on the lack of DOCUMENTATION. Lack of DOCUMENTATION is more important so it is what the user should see. * Add a few special cases for backwards compat. These should probably be made errors in 2.10: * no docs but has metadata shows no documentation rather than an error * empty plugin file shows no doumentation rather than an error * Simplify backwards compatibility logic.