ansible/test
Rick Elrod cace616aab
Filter BLACKLIST_EXTS in PluginLoader (#69029)
Change:
Rather than hardcoding .pyo and .pyc, filter on all BLACKLIST_EXTS in
the non-legacy logic of PluginLoader (_find_fq_plugin). The two harcoded
extensions are part of BLACKLIST_EXTS already and this simply adds the
rest of the blacklisted extensions to the check.

In addition, check .endswith() instead of an exact match of the suffix,
like everywhere else that uses BLACKLIST_EXTS. This allows for
blacklisting, for example, emacs's backup files which can appear after
any extension, leading to things like `foo.py~`.

Test Plan:
Ran `ansible-playbook` against a collection where a `foo.py~` module was
getting executed instead of `foo.py` which also appeared in the same
directory. `foo.py~` is no longer executed.

Tickets:
Fixes #22268
Refs #27235

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-04-22 17:20:12 -05:00
..
ansible_test
integration Filter BLACKLIST_EXTS in PluginLoader (#69029) 2020-04-22 17:20:12 -05:00
lib/ansible_test Fix ansible-test delegation from pip install. 2020-04-21 09:48:16 -07:00
sanity Filter BLACKLIST_EXTS in PluginLoader (#69029) 2020-04-22 17:20:12 -05:00
support add readme to test/support (#68450) 2020-03-24 17:15:01 -05:00
units Expose to_<str> as a public function (#68965) 2020-04-17 07:54:00 +10:00
utils/shippable Testing: Add support for CentOS Linux On Power platform (#68130) 2020-04-15 16:22:17 -07:00