diff --git a/changelogs/fragments/73599-ansible-test-new-plugin-dirs.yml b/changelogs/fragments/73599-ansible-test-new-plugin-dirs.yml new file mode 100644 index 00000000000..73db1b2ab21 --- /dev/null +++ b/changelogs/fragments/73599-ansible-test-new-plugin-dirs.yml @@ -0,0 +1,2 @@ +minor_changes: +- "ansible-test - add the collection plugin directories ``plugin_utils`` and ``sub_plugins`` to list of plugin types. This ensures such plugins are tested for the ``import`` sanity test (https://github.com/ansible/ansible/pull/73599)." diff --git a/test/lib/ansible_test/_internal/provider/layout/__init__.py b/test/lib/ansible_test/_internal/provider/layout/__init__.py index 81fd135d0f3..8065c64e0b7 100644 --- a/test/lib/ansible_test/_internal/provider/layout/__init__.py +++ b/test/lib/ansible_test/_internal/provider/layout/__init__.py @@ -193,6 +193,10 @@ class LayoutProvider(PathProvider): 'terminal', 'test', 'vars', + # The following are plugin directories not directly supported by ansible-core, but used in collections + # (https://github.com/ansible-collections/overview/blob/main/collection_requirements.rst#modules--plugins) + 'plugin_utils', + 'sub_plugins', ) @abc.abstractmethod diff --git a/test/lib/ansible_test/_internal/sanity/ansible_doc.py b/test/lib/ansible_test/_internal/sanity/ansible_doc.py index 30140cffc61..fc4c42f881b 100644 --- a/test/lib/ansible_test/_internal/sanity/ansible_doc.py +++ b/test/lib/ansible_test/_internal/sanity/ansible_doc.py @@ -58,6 +58,10 @@ class AnsibleDocTest(SanitySingleVersion): 'module_utils', 'terminal', 'test', + # The following are plugin directories not directly supported by ansible-core (and thus also not by ansible-doc) + # (https://github.com/ansible-collections/overview/blob/main/collection_requirements.rst#modules--plugins) + 'plugin_utils', + 'sub_plugins', ]) plugin_paths = [plugin_path for plugin_type, plugin_path in data_context().content.plugin_paths.items() if plugin_type not in unsupported_plugin_types]