diff options
Diffstat (limited to 'test')
5 files changed, 18 insertions, 2 deletions
diff --git a/test/integration/targets/egg-info/aliases b/test/integration/targets/egg-info/aliases new file mode 100644 index 0000000000..a6dafcf8cd --- /dev/null +++ b/test/integration/targets/egg-info/aliases @@ -0,0 +1 @@ +shippable/posix/group1 diff --git a/test/integration/targets/egg-info/lookup_plugins/import_pkg_resources.py b/test/integration/targets/egg-info/lookup_plugins/import_pkg_resources.py new file mode 100644 index 0000000000..c0c5ccd503 --- /dev/null +++ b/test/integration/targets/egg-info/lookup_plugins/import_pkg_resources.py @@ -0,0 +1,11 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pkg_resources + +from ansible.plugins.lookup import LookupBase + + +class LookupModule(LookupBase): + def run(self, terms, variables, **kwargs): + return ['ok'] diff --git a/test/integration/targets/egg-info/tasks/main.yml b/test/integration/targets/egg-info/tasks/main.yml new file mode 100644 index 0000000000..d7b886c00c --- /dev/null +++ b/test/integration/targets/egg-info/tasks/main.yml @@ -0,0 +1,3 @@ +- name: Make sure pkg_resources can be imported by plugins + debug: + msg: "{{ lookup('import_pkg_resources') }}" diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py index 787b966795..9e7e835a51 100644 --- a/test/lib/ansible_test/_internal/executor.py +++ b/test/lib/ansible_test/_internal/executor.py @@ -355,12 +355,12 @@ def generate_egg_info(args): # inclusion of the version number in the path is optional # see: https://setuptools.readthedocs.io/en/latest/formats.html#filename-embedded-metadata - egg_info_path = ANSIBLE_LIB_ROOT + '-%s.egg-info' % ansible_version + egg_info_path = ANSIBLE_LIB_ROOT + '_base-%s.egg-info' % ansible_version if os.path.exists(egg_info_path): return - egg_info_path = ANSIBLE_LIB_ROOT + '.egg-info' + egg_info_path = ANSIBLE_LIB_ROOT + '_base.egg-info' if os.path.exists(egg_info_path): return diff --git a/test/lib/ansible_test/_internal/provider/source/unversioned.py b/test/lib/ansible_test/_internal/provider/source/unversioned.py index 6019728083..09105789ca 100644 --- a/test/lib/ansible_test/_internal/provider/source/unversioned.py +++ b/test/lib/ansible_test/_internal/provider/source/unversioned.py @@ -37,6 +37,7 @@ class UnversionedSource(SourceProvider): '.pytest_cache', '__pycache__', 'ansible.egg-info', + 'ansible_base.egg-info', ) kill_sub_dir = { |