diff --git a/changelogs/fragments/ansible-test-remove-legacy-check.yml b/changelogs/fragments/ansible-test-remove-legacy-check.yml new file mode 100644 index 00000000000..8066acadacb --- /dev/null +++ b/changelogs/fragments/ansible-test-remove-legacy-check.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Remove check for legacy ``core`` and ``extras`` directories. diff --git a/test/lib/ansible_test/_internal/cli.py b/test/lib/ansible_test/_internal/cli.py index dce977c53d6..05b4e3e08c5 100644 --- a/test/lib/ansible_test/_internal/cli.py +++ b/test/lib/ansible_test/_internal/cli.py @@ -38,7 +38,6 @@ from .executor import ( ApplicationWarning, Delegate, generate_pip_install, - check_startup, configure_pypi_proxy, ) @@ -163,7 +162,6 @@ def main(): display.redact = config.redact display.color = config.color display.info_stderr = config.info_stderr - check_startup() check_delegation_args(config) configure_timeout(config) diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py index f2af5974d2b..2fa4da0020e 100644 --- a/test/lib/ansible_test/_internal/executor.py +++ b/test/lib/ansible_test/_internal/executor.py @@ -151,23 +151,6 @@ from .http import ( ) -def check_startup(): - """Checks to perform at startup before running commands.""" - check_legacy_modules() - - -def check_legacy_modules(): - """Detect conflicts with legacy core/extras module directories to avoid problems later.""" - for directory in 'core', 'extras': - path = 'lib/ansible/modules/%s' % directory - - for root, _dir_names, file_names in os.walk(path): - if file_names: - # the directory shouldn't exist, but if it does, it must contain no files - raise ApplicationError('Files prohibited in "%s". ' - 'These are most likely legacy modules from version 2.2 or earlier.' % root) - - def create_shell_command(command): """ :type command: list[str]