[stable-2.9] ansible-test - ensure trailing separator is added for connection unit test target (#74176) (#74182)

For connection units tests, if the `__init__.py` file is modified, the trailing separator was
not added, making the target invalid.
(cherry picked from commit 7b79b69369)

Co-authored-by: Sam Doran <sdoran@redhat.com>
This commit is contained in:
Sam Doran
2021-04-12 21:56:12 -04:00
committed by GitHub
parent 3155c8c26c
commit cc97479f9d
2 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
bugfixes:
- >-
ansible-test - ensure the correct unit test target is given when the
``__init__.py`` file is modified inside the connection plugins directory

View File

@@ -527,7 +527,7 @@ class PathMapper:
'integration': self.integration_all_target,
'windows-integration': self.integration_all_target,
'network-integration': self.integration_all_target,
'units': units_dir,
'units': os.path.join(units_dir, ''),
}
units_path = os.path.join(units_dir, 'test_%s.py' % name)