From 29aef842d77b24105ce356d4b313be2269d466d6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 13 Feb 2021 23:05:16 +0100 Subject: [PATCH] ansible-test: make sure tests are also run for the new plugin types (#73599) * Make sure tests are also run for the new plugin types. * New plugin types are not documentable. --- changelogs/fragments/73599-ansible-test-new-plugin-dirs.yml | 2 ++ test/lib/ansible_test/_internal/provider/layout/__init__.py | 4 ++++ test/lib/ansible_test/_internal/sanity/ansible_doc.py | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 changelogs/fragments/73599-ansible-test-new-plugin-dirs.yml 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]