From 8d92df45374affb08fdd7a6d7da6a15dfaa008c2 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 24 Jun 2020 15:23:55 -0700 Subject: [PATCH] Test netconf plugins in ansible-doc sanity test. --- changelogs/fragments/ansible-test-sanity-ansible-doc.yml | 2 ++ test/lib/ansible_test/_internal/sanity/ansible_doc.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/ansible-test-sanity-ansible-doc.yml diff --git a/changelogs/fragments/ansible-test-sanity-ansible-doc.yml b/changelogs/fragments/ansible-test-sanity-ansible-doc.yml new file mode 100644 index 00000000000..63ad7f01b89 --- /dev/null +++ b/changelogs/fragments/ansible-test-sanity-ansible-doc.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - The ``ansible-doc`` sanity test now works for ``netconf`` plugins. diff --git a/test/lib/ansible_test/_internal/sanity/ansible_doc.py b/test/lib/ansible_test/_internal/sanity/ansible_doc.py index ef965654d60..c6b997cfb1d 100644 --- a/test/lib/ansible_test/_internal/sanity/ansible_doc.py +++ b/test/lib/ansible_test/_internal/sanity/ansible_doc.py @@ -50,18 +50,17 @@ class AnsibleDocTest(SanitySingleVersion): def filter_targets(self, targets): # type: (t.List[TestTarget]) -> t.List[TestTarget] """Return the given list of test targets, filtered to include only those relevant for the test.""" # This should use documentable plugins from constants instead - plugin_type_blacklist = set([ + unsupported_plugin_types = set([ # not supported by ansible-doc 'action', 'doc_fragments', 'filter', 'module_utils', - 'netconf', 'terminal', 'test', ]) - plugin_paths = [plugin_path for plugin_type, plugin_path in data_context().content.plugin_paths.items() if plugin_type not in plugin_type_blacklist] + plugin_paths = [plugin_path for plugin_type, plugin_path in data_context().content.plugin_paths.items() if plugin_type not in unsupported_plugin_types] return [target for target in targets if os.path.splitext(target.path)[1] == '.py'