summaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authorFelix Fontein <felix@fontein.de>2024-03-22 00:40:46 +0100
committerGitHub <noreply@github.com>2024-03-22 00:40:46 +0100
commitc0821346fcb8f37db3a9b8c6985e197b93f4c2f1 (patch)
tree11c6a79e4cdd6ab41f0b409d47a661a403d1d91b /test/lib
parentansible-doc: restore role attributes (#82678) (diff)
downloadansible-c0821346fcb8f37db3a9b8c6985e197b93f4c2f1.tar.xz
ansible-c0821346fcb8f37db3a9b8c6985e197b93f4c2f1.zip
Do not mangle plugin names in collections that start with an underscore. (#82574)
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py b/test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py
index ff035ef913..1b3b4023e4 100644
--- a/test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py
+++ b/test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py
@@ -79,7 +79,7 @@ class AnsibleDocTest(SanitySingleVersion):
plugin_parts = os.path.relpath(plugin_file_path, plugin_path).split(os.path.sep)
plugin_name = os.path.splitext(plugin_parts[-1])[0]
- if plugin_name.startswith('_'):
+ if plugin_name.startswith('_') and not data_context().content.collection:
plugin_name = plugin_name[1:]
plugin_fqcn = data_context().content.prefix + '.'.join(plugin_parts[:-1] + [plugin_name])