diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index dd56f6565e2..d9346a9b933 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -121,16 +121,16 @@ files: notified: mattclay test/lib/: notified: mattclay - test/lib/ansible_test/_data/sanity/validate-modules: + test/lib/ansible_test/_util/controller/sanity/validate-modules: keywords: - validate-modules notified: - mattclay - test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py: + test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py: notified: - gundalow - sivel - test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py: + test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py: notified: - gundalow - sivel diff --git a/MANIFEST.in b/MANIFEST.in index 4ed9a8ecb99..9a78e75e138 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -25,9 +25,10 @@ recursive-include packaging * recursive-include test/ansible_test *.py Makefile recursive-include test/integration * recursive-include test/lib/ansible_test/config *.yml *.template -recursive-include test/lib/ansible_test/_data *.cfg *.ini *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml coveragerc inventory -recursive-include test/lib/ansible_test/_data/injector ansible ansible-config ansible-connection ansible-console ansible-doc ansible-galaxy ansible-playbook ansible-pull ansible-test ansible-vault pytest -recursive-include test/lib/ansible_test/_data/sanity/validate-modules validate-modules +recursive-include test/lib/ansible_test/_data *.cfg *.ini *.ps1 *.txt *.yml coveragerc inventory +recursive-include test/lib/ansible_test/_util *.cfg *.json *.ps1 *.psd1 *.py *.sh *.txt *.yml +recursive-include test/lib/ansible_test/_util/target/injector ansible ansible-config ansible-connection ansible-console ansible-doc ansible-galaxy ansible-inventory ansible-playbook ansible-pull ansible-test ansible-vault pytest +recursive-include test/lib/ansible_test/_util/controller/sanity/validate-modules validate-modules recursive-include test/sanity *.json *.py *.txt recursive-include test/support *.py *.ps1 *.psm1 *.cs exclude test/sanity/code-smell/botmeta.* diff --git a/bin/ansible-test b/bin/ansible-test index 14f009af86c..a540045f64a 120000 --- a/bin/ansible-test +++ b/bin/ansible-test @@ -1 +1 @@ -../test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py \ No newline at end of file +../test/lib/ansible_test/_util/controller/cli/ansible_test_cli_stub.py \ No newline at end of file diff --git a/changelogs/fragments/ansible-test-utils.yml b/changelogs/fragments/ansible-test-utils.yml new file mode 100644 index 00000000000..d71d36b6d7e --- /dev/null +++ b/changelogs/fragments/ansible-test-utils.yml @@ -0,0 +1,2 @@ +minor_changes: + - ansible-test - Move code from ``_data`` directory to ``_util`` directory. diff --git a/docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst b/docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst index dcec7ed380d..a8e33a7f445 100644 --- a/docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst +++ b/docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst @@ -6,6 +6,6 @@ These files must reside in the ``lib/ansible/`` or ``test/lib/ansible_test/`` di This is required to allow ``ansible-test`` to work with containers and remote hosts when running from an installed version of Ansible. -Symlinks for each entry point in ``bin/`` must also be present in ``test/lib/ansible_test/_data/injector/``. +Symlinks for each entry point in ``bin/`` must also be present in ``test/lib/ansible_test/_util/target/injector/``. Each symlink should point to the ``python.py`` script in the same directory. This facilitates running with the correct Python interpreter and enabling code coverage. diff --git a/docs/docsite/rst/dev_guide/testing/sanity/obsolete-files.rst b/docs/docsite/rst/dev_guide/testing/sanity/obsolete-files.rst index 6e2fb2a5797..cb237468943 100644 --- a/docs/docsite/rst/dev_guide/testing/sanity/obsolete-files.rst +++ b/docs/docsite/rst/dev_guide/testing/sanity/obsolete-files.rst @@ -8,7 +8,7 @@ The new location (if any) is dependent on which directory has been made obsolete Below are some of the obsolete directories and their new locations: - All of ``test/runner/`` is now under ``test/lib/ansible_test/`` instead. The organization of files in the new directory has changed. -- Most subdirectories of ``test/sanity/`` (with some exceptions) are now under ``test/lib/ansible_test/_data/sanity/`` instead. +- Most subdirectories of ``test/sanity/`` (with some exceptions) are now under ``test/lib/ansible_test/_util/controller/sanity/`` instead. This error occurs most frequently for open pull requests which add or modify files in directories which are now obsolete. Make sure the branch you are working from is current so that changes can be made in the correct location. diff --git a/docs/docsite/rst/dev_guide/testing_validate-modules.rst b/docs/docsite/rst/dev_guide/testing_validate-modules.rst index cba5d5d38bb..80fcc95a948 100644 --- a/docs/docsite/rst/dev_guide/testing_validate-modules.rst +++ b/docs/docsite/rst/dev_guide/testing_validate-modules.rst @@ -52,7 +52,7 @@ Help Extending validate-modules ========================== -The ``validate-modules`` tool has a `schema.py `_ that is used to validate the YAML blocks, such as ``DOCUMENTATION`` and ``RETURNS``. +The ``validate-modules`` tool has a `schema.py `_ that is used to validate the YAML blocks, such as ``DOCUMENTATION`` and ``RETURNS``. Codes diff --git a/lib/ansible/utils/collection_loader/__init__.py b/lib/ansible/utils/collection_loader/__init__.py index b63c239d20e..21c49c47305 100644 --- a/lib/ansible/utils/collection_loader/__init__.py +++ b/lib/ansible/utils/collection_loader/__init__.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/lib/ansible/utils/collection_loader/_collection_config.py b/lib/ansible/utils/collection_loader/_collection_config.py index c0680942b4f..a20319319ce 100644 --- a/lib/ansible/utils/collection_loader/_collection_config.py +++ b/lib/ansible/utils/collection_loader/_collection_config.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/lib/ansible/utils/collection_loader/_collection_finder.py b/lib/ansible/utils/collection_loader/_collection_finder.py index 060cb321729..13fab8922dd 100644 --- a/lib/ansible/utils/collection_loader/_collection_finder.py +++ b/lib/ansible/utils/collection_loader/_collection_finder.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/lib/ansible/utils/collection_loader/_collection_meta.py b/lib/ansible/utils/collection_loader/_collection_meta.py index 756cd7ac6ea..6baa9dca059 100644 --- a/lib/ansible/utils/collection_loader/_collection_meta.py +++ b/lib/ansible/utils/collection_loader/_collection_meta.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/test/ansible_test/Makefile b/test/ansible_test/Makefile index 7fb2a007600..2d85e3da76c 100644 --- a/test/ansible_test/Makefile +++ b/test/ansible_test/Makefile @@ -10,4 +10,4 @@ unit: .PHONY: validate-modules-unit validate-modules-unit: - PYTHONPATH=$(abspath ${CURDIR}/../lib/ansible_test/_data/sanity/validate-modules):$(abspath ${CURDIR}/../../lib) pytest validate-modules-unit ${FLAGS} + PYTHONPATH=$(abspath ${CURDIR}/../lib/ansible_test/_util/controller/sanity/validate-modules):$(abspath ${CURDIR}/../../lib) pytest validate-modules-unit ${FLAGS} diff --git a/test/lib/ansible_test/_internal/ansible_util.py b/test/lib/ansible_test/_internal/ansible_util.py index 6570b896dd6..614e8aacb79 100644 --- a/test/lib/ansible_test/_internal/ansible_util.py +++ b/test/lib/ansible_test/_internal/ansible_util.py @@ -24,6 +24,8 @@ from .util import ( ANSIBLE_TEST_DATA_ROOT, ANSIBLE_BIN_PATH, ANSIBLE_SOURCE_ROOT, + ANSIBLE_TEST_TARGET_ROOT, + ANSIBLE_TEST_TOOLS_ROOT, get_ansible_version, ) @@ -97,7 +99,7 @@ def ansible_environment(args, color=True, ansible_config=None): # ansible-connection only requires the injector for code coverage # the correct python interpreter is already selected using the sys.executable used to invoke ansible ansible.update(dict( - ANSIBLE_CONNECTION_PATH=os.path.join(ANSIBLE_TEST_DATA_ROOT, 'injector', 'ansible-connection'), + ANSIBLE_CONNECTION_PATH=os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'injector', 'ansible-connection'), )) if isinstance(args, PosixIntegrationConfig): @@ -244,7 +246,7 @@ def check_pyyaml(args, version, required=True, quiet=False): pass python = find_python(version) - stdout, _dummy = run_command(args, [python, os.path.join(ANSIBLE_TEST_DATA_ROOT, 'yamlcheck.py')], + stdout, _dummy = run_command(args, [python, os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'yamlcheck.py')], capture=True, always=True) result = json.loads(stdout) @@ -284,7 +286,7 @@ def get_collection_detail(args, python): # type: (EnvironmentConfig, str) -> Co collection = data_context().content.collection directory = os.path.join(collection.root, collection.directory) - stdout = run_command(args, [python, os.path.join(ANSIBLE_TEST_DATA_ROOT, 'collection_detail.py'), directory], capture=True, always=True)[0] + stdout = run_command(args, [python, os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'collection_detail.py'), directory], capture=True, always=True)[0] result = json.loads(stdout) error = result.get('error') diff --git a/test/lib/ansible_test/_internal/classification/__init__.py b/test/lib/ansible_test/_internal/classification/__init__.py index 69c594ae297..4a3daef7011 100644 --- a/test/lib/ansible_test/_internal/classification/__init__.py +++ b/test/lib/ansible_test/_internal/classification/__init__.py @@ -804,30 +804,12 @@ class PathMapper: 'integration': 'ansible-test', # run ansible-test self tests } - if path.startswith('test/lib/ansible_test/_data/sanity/'): - return { - 'sanity': 'all', # test infrastructure, run all sanity checks - 'integration': 'ansible-test', # run ansible-test self tests - } - if path.startswith('test/lib/ansible_test/_internal/commands/units/'): return { 'units': 'all', # test infrastructure, run all unit tests 'integration': 'ansible-test', # run ansible-test self tests } - if path.startswith('test/lib/ansible_test/_data/units/'): - return { - 'units': 'all', # test infrastructure, run all unit tests - 'integration': 'ansible-test', # run ansible-test self tests - } - - if path.startswith('test/lib/ansible_test/_data/pytest/'): - return { - 'units': 'all', # test infrastructure, run all unit tests - 'integration': 'ansible-test', # run ansible-test self tests - } - if path.startswith('test/lib/ansible_test/_data/requirements/'): if name in ( 'integration', @@ -854,6 +836,18 @@ class PathMapper: 'integration': cloud_target, } + if path.startswith('test/lib/ansible_test/_util/controller/sanity/') or path.startswith('test/lib/ansible_test/_util/target/sanity/'): + return { + 'sanity': 'all', # test infrastructure, run all sanity checks + 'integration': 'ansible-test', # run ansible-test self tests + } + + if path.startswith('test/lib/ansible_test/_util/target/pytest/'): + return { + 'units': 'all', # test infrastructure, run all unit tests + 'integration': 'ansible-test', # run ansible-test self tests + } + if path.startswith('test/lib/'): return all_tests(self.args) # test infrastructure, run all tests diff --git a/test/lib/ansible_test/_internal/classification/python.py b/test/lib/ansible_test/_internal/classification/python.py index 0ce0367561d..1e3505db5a5 100644 --- a/test/lib/ansible_test/_internal/classification/python.py +++ b/test/lib/ansible_test/_internal/classification/python.py @@ -269,7 +269,8 @@ class ModuleUtilFinder(ast.NodeVisitor): path_map = ( ('^hacking/build_library/build_ansible/', 'build_ansible/'), ('^lib/ansible/', 'ansible/'), - ('^test/lib/ansible_test/_data/sanity/validate-modules/', 'validate_modules/'), + ('^test/lib/ansible_test/_util/controller/sanity/validate-modules/', 'validate_modules/'), + ('^test/lib/ansible_test/_util/target/legacy_collection_loader/', 'legacy_collection_loader/'), ('^test/units/', 'test/units/'), ('^test/lib/ansible_test/_internal/', 'ansible_test/_internal/'), ('^test/integration/targets/.*/ansible_collections/(?P[^/]*)/(?P[^/]*)/', r'ansible_collections/\g/\g/'), diff --git a/test/lib/ansible_test/_internal/commands/coverage/combine.py b/test/lib/ansible_test/_internal/commands/coverage/combine.py index f4d664608bf..caa4fa92e7c 100644 --- a/test/lib/ansible_test/_internal/commands/coverage/combine.py +++ b/test/lib/ansible_test/_internal/commands/coverage/combine.py @@ -17,7 +17,7 @@ from ...io import ( ) from ...util import ( - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TOOLS_ROOT, display, ApplicationError, ) @@ -181,7 +181,7 @@ def _command_coverage_combine_powershell(args): coverage_files = get_powershell_coverage_files() def _default_stub_value(source_paths): - cmd = ['pwsh', os.path.join(ANSIBLE_TEST_DATA_ROOT, 'coverage_stub.ps1')] + cmd = ['pwsh', os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'coverage_stub.ps1')] cmd.extend(source_paths) stubs = json.loads(run_command(args, cmd, capture=True, always=True)[0]) diff --git a/test/lib/ansible_test/_internal/commands/integration/__init__.py b/test/lib/ansible_test/_internal/commands/integration/__init__.py index 75a504bc1a8..f6e2721b60d 100644 --- a/test/lib/ansible_test/_internal/commands/integration/__init__.py +++ b/test/lib/ansible_test/_internal/commands/integration/__init__.py @@ -72,7 +72,7 @@ from ...util import ( remove_tree, find_executable, raw_command, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TOOLS_ROOT, SUPPORTED_PYTHON_VERSIONS, get_hash, ) @@ -1132,7 +1132,7 @@ class EnvironmentDescription: versions += SUPPORTED_PYTHON_VERSIONS versions += list(set(v.split('.', 1)[0] for v in SUPPORTED_PYTHON_VERSIONS)) - version_check = os.path.join(ANSIBLE_TEST_DATA_ROOT, 'versions.py') + version_check = os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'versions.py') python_paths = dict((v, find_executable('python%s' % v, required=False)) for v in sorted(versions)) pip_paths = dict((v, find_executable('pip%s' % v, required=False)) for v in sorted(versions)) program_versions = dict((v, self.get_version([python_paths[v], version_check], warnings)) for v in sorted(python_paths) if python_paths[v]) diff --git a/test/lib/ansible_test/_internal/commands/sanity/__init__.py b/test/lib/ansible_test/_internal/commands/sanity/__init__.py index 58c838e862f..45170ff1139 100644 --- a/test/lib/ansible_test/_internal/commands/sanity/__init__.py +++ b/test/lib/ansible_test/_internal/commands/sanity/__init__.py @@ -22,7 +22,8 @@ from ...util import ( load_plugins, parse_to_list_of_dict, ABC, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_CONTROLLER_ROOT, + ANSIBLE_TEST_TARGET_ROOT, is_binary_file, read_lines_without_comments, get_available_python_versions, @@ -80,7 +81,8 @@ from ...content_config import ( ) COMMAND = 'sanity' -SANITY_ROOT = os.path.join(ANSIBLE_TEST_DATA_ROOT, 'sanity') +SANITY_ROOT = os.path.join(ANSIBLE_TEST_CONTROLLER_ROOT, 'sanity') +TARGET_SANITY_ROOT = os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'sanity') def command_sanity(args): diff --git a/test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py b/test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py index 185f22d1fa0..934da9f60c7 100644 --- a/test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py +++ b/test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py @@ -28,7 +28,7 @@ from ...payload import ( from ...util import ( ANSIBLE_BIN_PATH, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TARGET_ROOT, ) @@ -57,7 +57,7 @@ class BinSymlinksTest(SanityVersionNeutral): bin_names = os.listdir(bin_root) bin_paths = sorted(os.path.join(bin_root, path) for path in bin_names) - injector_root = os.path.join(ANSIBLE_TEST_DATA_ROOT, 'injector') + injector_root = os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'injector') injector_names = os.listdir(injector_root) errors = [] # type: t.List[t.Tuple[str, str]] diff --git a/test/lib/ansible_test/_internal/commands/sanity/compile.py b/test/lib/ansible_test/_internal/commands/sanity/compile.py index 3577c60a333..9f92401efc5 100644 --- a/test/lib/ansible_test/_internal/commands/sanity/compile.py +++ b/test/lib/ansible_test/_internal/commands/sanity/compile.py @@ -12,7 +12,7 @@ from . import ( SanityFailure, SanitySuccess, SanityTargets, - SANITY_ROOT, + TARGET_SANITY_ROOT, ) from ...target import ( @@ -53,7 +53,7 @@ class CompileTest(SanityMultipleVersion): paths = [target.path for target in targets.include] - cmd = [find_python(python_version), os.path.join(SANITY_ROOT, 'compile', 'compile.py')] + cmd = [find_python(python_version), os.path.join(TARGET_SANITY_ROOT, 'compile', 'compile.py')] data = '\n'.join(paths) diff --git a/test/lib/ansible_test/_internal/commands/sanity/import.py b/test/lib/ansible_test/_internal/commands/sanity/import.py index d3a884555c2..9dfd4f3407d 100644 --- a/test/lib/ansible_test/_internal/commands/sanity/import.py +++ b/test/lib/ansible_test/_internal/commands/sanity/import.py @@ -12,7 +12,7 @@ from . import ( SanityFailure, SanitySuccess, SanitySkipped, - SANITY_ROOT, + TARGET_SANITY_ROOT, ) from ...target import ( @@ -138,8 +138,8 @@ class ImportTest(SanityMultipleVersion): importer_path = os.path.join(virtual_environment_bin, 'importer.py') yaml_to_json_path = os.path.join(virtual_environment_bin, 'yaml_to_json.py') if not args.explain: - os.symlink(os.path.abspath(os.path.join(SANITY_ROOT, 'import', 'importer.py')), importer_path) - os.symlink(os.path.abspath(os.path.join(SANITY_ROOT, 'import', 'yaml_to_json.py')), yaml_to_json_path) + os.symlink(os.path.abspath(os.path.join(TARGET_SANITY_ROOT, 'import', 'importer.py')), importer_path) + os.symlink(os.path.abspath(os.path.join(TARGET_SANITY_ROOT, 'import', 'yaml_to_json.py')), yaml_to_json_path) # activate the virtual environment env['PATH'] = '%s:%s' % (virtual_environment_bin, env['PATH']) diff --git a/test/lib/ansible_test/_internal/commands/sanity/pylint.py b/test/lib/ansible_test/_internal/commands/sanity/pylint.py index 64983a4d499..e69d58b7624 100644 --- a/test/lib/ansible_test/_internal/commands/sanity/pylint.py +++ b/test/lib/ansible_test/_internal/commands/sanity/pylint.py @@ -136,10 +136,11 @@ class PylintTest(SanitySingleVersion): if data_context().content.collection: add_context(remaining_paths, 'collection', lambda p: True) else: - add_context(remaining_paths, 'validate-modules', filter_path('test/lib/ansible_test/_data/sanity/validate-modules/')) + add_context(remaining_paths, 'validate-modules', filter_path('test/lib/ansible_test/_util/controller/sanity/validate-modules/')) add_context(remaining_paths, 'validate-modules-unit', filter_path('test/lib/ansible_test/tests/validate-modules-unit/')) - add_context(remaining_paths, 'sanity', filter_path('test/lib/ansible_test/_data/sanity/')) - add_context(remaining_paths, 'legacy-collection-loader', filter_path('test/lib/ansible_test/_data/legacy_collection_loader/')) + add_context(remaining_paths, 'sanity', filter_path('test/lib/ansible_test/_util/controller/sanity/')) + add_context(remaining_paths, 'sanity', filter_path('test/lib/ansible_test/_util/target/sanity/')) + add_context(remaining_paths, 'legacy-collection-loader', filter_path('test/lib/ansible_test/_util/target/legacy_collection_loader/')) add_context(remaining_paths, 'ansible-test', filter_path('test/lib/')) add_context(remaining_paths, 'test', filter_path('test/')) add_context(remaining_paths, 'hacking', filter_path('hacking/')) diff --git a/test/lib/ansible_test/_internal/commands/units/__init__.py b/test/lib/ansible_test/_internal/commands/units/__init__.py index 51aa804fa0c..c6d520acf08 100644 --- a/test/lib/ansible_test/_internal/commands/units/__init__.py +++ b/test/lib/ansible_test/_internal/commands/units/__init__.py @@ -21,6 +21,7 @@ from ...util import ( CONTROLLER_PYTHON_VERSIONS, REMOTE_ONLY_PYTHON_VERSIONS, ANSIBLE_LIB_ROOT, + ANSIBLE_TEST_TARGET_ROOT, ) from ...util_common import ( @@ -203,7 +204,7 @@ def command_units(args): plugins.append('ansible_pytest_collections') if plugins: - env['PYTHONPATH'] += ':%s' % os.path.join(ANSIBLE_TEST_DATA_ROOT, 'pytest/plugins') + env['PYTHONPATH'] += ':%s' % os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'pytest/plugins') env['PYTEST_PLUGINS'] = ','.join(plugins) if args.collect_only: @@ -262,7 +263,7 @@ def get_units_ansible_python_path(args, test_context): # type: (UnitsConfig, st # legacy collection loader required by all python versions not supported by the controller write_text_file(os.path.join(ansible_test_path, '__init__.py'), '', True) write_text_file(os.path.join(ansible_test_path, '_internal', '__init__.py'), '', True) - os.symlink(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'legacy_collection_loader'), os.path.join(ansible_test_path, '_internal', 'legacy_collection_loader')) + os.symlink(os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'legacy_collection_loader'), os.path.join(ansible_test_path, '_internal', 'legacy_collection_loader')) elif test_context == TestContext.modules: # only non-collection ansible module tests should have access to ansible built-in modules os.symlink(os.path.join(ANSIBLE_LIB_ROOT, 'modules'), os.path.join(ansible_path, 'modules')) diff --git a/test/lib/ansible_test/_internal/core_ci.py b/test/lib/ansible_test/_internal/core_ci.py index a48fdbe0e1b..aad7d1da243 100644 --- a/test/lib/ansible_test/_internal/core_ci.py +++ b/test/lib/ansible_test/_internal/core_ci.py @@ -28,7 +28,7 @@ from .io import ( from .util import ( ApplicationError, display, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TARGET_ROOT, ) from .util_common import ( @@ -325,7 +325,7 @@ class AnsibleCoreCI: display.info('Initializing new %s/%s instance %s.' % (self.platform, self.version, self.instance_id), verbosity=1) if self.platform == 'windows': - winrm_config = read_text_file(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'setup', 'ConfigureRemotingForAnsible.ps1')) + winrm_config = read_text_file(os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'setup', 'ConfigureRemotingForAnsible.ps1')) else: winrm_config = None diff --git a/test/lib/ansible_test/_internal/delegation.py b/test/lib/ansible_test/_internal/delegation.py index 2ee176a1ba2..53b52e1ffa2 100644 --- a/test/lib/ansible_test/_internal/delegation.py +++ b/test/lib/ansible_test/_internal/delegation.py @@ -49,7 +49,7 @@ from .util import ( common_environment, display, ANSIBLE_BIN_PATH, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TARGET_ROOT, ANSIBLE_LIB_ROOT, ANSIBLE_TEST_ROOT, tempdir, @@ -297,7 +297,7 @@ def delegate_docker(args, exclude, require): test_id = docker_run(args, test_image, options=test_options) - setup_sh = read_text_file(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'setup', 'docker.sh')) + setup_sh = read_text_file(os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'setup', 'docker.sh')) ssh_keys_sh = get_ssh_key_setup(SshKey(args)) diff --git a/test/lib/ansible_test/_internal/executor.py b/test/lib/ansible_test/_internal/executor.py index aeebc9749fd..245589327ff 100644 --- a/test/lib/ansible_test/_internal/executor.py +++ b/test/lib/ansible_test/_internal/executor.py @@ -26,6 +26,7 @@ from .util import ( find_python, cmd_quote, ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TOOLS_ROOT, str_to_version, version_to_str, ) @@ -99,7 +100,7 @@ def get_openssl_version(args, python, python_version): # type: (EnvironmentConf if not python_version.startswith('2.'): # OpenSSL version checking only works on Python 3.x. # This should be the most accurate, since it is the Python we will be using. - version = json.loads(run_command(args, [python, os.path.join(ANSIBLE_TEST_DATA_ROOT, 'sslcheck.py')], capture=True, always=True)[0])['version'] + version = json.loads(run_command(args, [python, os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'sslcheck.py')], capture=True, always=True)[0])['version'] if version: display.info('Detected OpenSSL version %s under Python %s.' % (version_to_str(version), python_version), verbosity=1) diff --git a/test/lib/ansible_test/_internal/manage_ci.py b/test/lib/ansible_test/_internal/manage_ci.py index 70da3986429..f8d659d8e09 100644 --- a/test/lib/ansible_test/_internal/manage_ci.py +++ b/test/lib/ansible_test/_internal/manage_ci.py @@ -19,7 +19,7 @@ from .util import ( Display, cmd_quote, display, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TARGET_ROOT, ) from .util_common import ( @@ -276,7 +276,7 @@ class ManagePosixCI: """Configure remote host for testing. :type python_version: str """ - template = ShellScriptTemplate(read_text_file(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'setup', 'remote.sh'))) + template = ShellScriptTemplate(read_text_file(os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'setup', 'remote.sh'))) setup_sh = template.substitute( platform=self.core_ci.platform, platform_version=self.core_ci.version, @@ -401,7 +401,7 @@ class ManagePosixCI: def get_ssh_key_setup(ssh_key): # type: (SshKey) -> str """Generate and return a script to configure SSH keys on a host.""" - template = ShellScriptTemplate(read_text_file(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'setup', 'ssh-keys.sh'))) + template = ShellScriptTemplate(read_text_file(os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'setup', 'ssh-keys.sh'))) ssh_keys_sh = template.substitute( ssh_public_key=ssh_key.pub_contents, diff --git a/test/lib/ansible_test/_internal/payload.py b/test/lib/ansible_test/_internal/payload.py index 87d6ad81347..1e6971e60b2 100644 --- a/test/lib/ansible_test/_internal/payload.py +++ b/test/lib/ansible_test/_internal/payload.py @@ -47,7 +47,7 @@ ANSIBLE_BIN_SYMLINK_MAP = { 'ansible-inventory': 'ansible', 'ansible-playbook': 'ansible', 'ansible-pull': 'ansible', - 'ansible-test': '../test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py', + 'ansible-test': '../test/lib/ansible_test/_util/controller/cli/ansible_test_cli_stub.py', 'ansible-vault': 'ansible', } diff --git a/test/lib/ansible_test/_internal/util.py b/test/lib/ansible_test/_internal/util.py index db3daaa4ca6..ebb9a68f31e 100644 --- a/test/lib/ansible_test/_internal/util.py +++ b/test/lib/ansible_test/_internal/util.py @@ -97,8 +97,14 @@ if not os.path.exists(ANSIBLE_LIB_ROOT): ANSIBLE_SOURCE_ROOT = ANSIBLE_ROOT ANSIBLE_TEST_DATA_ROOT = os.path.join(ANSIBLE_TEST_ROOT, '_data') +ANSIBLE_TEST_UTIL_ROOT = os.path.join(ANSIBLE_TEST_ROOT, '_util') ANSIBLE_TEST_CONFIG_ROOT = os.path.join(ANSIBLE_TEST_ROOT, 'config') +ANSIBLE_TEST_CONTROLLER_ROOT = os.path.join(ANSIBLE_TEST_UTIL_ROOT, 'controller') +ANSIBLE_TEST_TARGET_ROOT = os.path.join(ANSIBLE_TEST_UTIL_ROOT, 'target') + +ANSIBLE_TEST_TOOLS_ROOT = os.path.join(ANSIBLE_TEST_CONTROLLER_ROOT, 'tools') + # Modes are set to allow all users the same level of access. # This permits files to be used in tests that change users. # The only exception is write access to directories for the user creating them. @@ -265,7 +271,7 @@ def generate_pip_command(python): :type python: str :rtype: list[str] """ - return [python, os.path.join(ANSIBLE_TEST_DATA_ROOT, 'quiet_pip.py')] + return [python, os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'quiet_pip.py')] def raw_command(cmd, capture=False, env=None, data=None, cwd=None, explain=False, stdin=None, stdout=None, diff --git a/test/lib/ansible_test/_internal/util_common.py b/test/lib/ansible_test/_internal/util_common.py index eac11522345..50f804ce0f8 100644 --- a/test/lib/ansible_test/_internal/util_common.py +++ b/test/lib/ansible_test/_internal/util_common.py @@ -29,6 +29,7 @@ from .util import ( raw_command, read_lines_without_comments, ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TARGET_ROOT, ApplicationError, cmd_quote, SubprocessError, @@ -416,7 +417,7 @@ def intercept_command(args, cmd, target_name, env, capture=False, data=None, cwd cmd = list(cmd) version = python_version or args.python_version interpreter = virtualenv or find_python(version) - inject_path = os.path.join(ANSIBLE_TEST_DATA_ROOT, 'injector') + inject_path = os.path.join(ANSIBLE_TEST_TARGET_ROOT, 'injector') if not virtualenv: # injection of python into the path is required when not activating a virtualenv diff --git a/test/lib/ansible_test/_internal/venv.py b/test/lib/ansible_test/_internal/venv.py index 49235f8662a..181c01ba952 100644 --- a/test/lib/ansible_test/_internal/venv.py +++ b/test/lib/ansible_test/_internal/venv.py @@ -16,7 +16,7 @@ from .util import ( find_python, SubprocessError, get_available_python_versions, - ANSIBLE_TEST_DATA_ROOT, + ANSIBLE_TEST_TOOLS_ROOT, display, remove_tree, ) @@ -128,7 +128,7 @@ def get_python_real_prefix(args, path): # type: (EnvironmentConfig, str) -> t.O """ Return the real prefix of the specified interpreter or None if the interpreter is not a virtual environment created by 'virtualenv'. """ - cmd = [path, os.path.join(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'virtualenvcheck.py'))] + cmd = [path, os.path.join(os.path.join(ANSIBLE_TEST_TOOLS_ROOT, 'virtualenvcheck.py'))] check_result = json.loads(run_command(args, cmd, capture=True, always=True)[0]) real_prefix = check_result['real_prefix'] return real_prefix diff --git a/test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py b/test/lib/ansible_test/_util/controller/cli/ansible_test_cli_stub.py similarity index 100% rename from test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py rename to test/lib/ansible_test/_util/controller/cli/ansible_test_cli_stub.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/changelog.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/changelog.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/changelog.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/changelog.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/changelog.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/changelog.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/changelog.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/changelog.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/changelog/sphinx.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/changelog/sphinx.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/changelog/sphinx.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/changelog/sphinx.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/empty-init.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/empty-init.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/empty-init.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/empty-init.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/line-endings.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/line-endings.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/line-endings.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/line-endings.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-assert.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-assert.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-assert.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-assert.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-basestring.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-basestring.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-basestring.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-basestring.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-basestring.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-basestring.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-main-display.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-main-display.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-main-display.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-main-display.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-main-display.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-main-display.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py similarity index 99% rename from test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py index 8bc5098f203..7db04ced7b5 100755 --- a/test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py +++ b/test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py @@ -107,8 +107,7 @@ def get_collection_version(): """Return current collection version, or None if it is not available""" import importlib.util - collection_detail_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), - 'collection_detail.py') + collection_detail_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'tools', 'collection_detail.py') collection_detail_spec = importlib.util.spec_from_file_location('collection_detail', collection_detail_path) collection_detail = importlib.util.module_from_spec(collection_detail_spec) sys.modules['collection_detail'] = collection_detail diff --git a/test/lib/ansible_test/_data/sanity/code-smell/shebang.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/shebang.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/shebang.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.py similarity index 98% rename from test/lib/ansible_test/_data/sanity/code-smell/shebang.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.py index 7cf3cf72009..b945734cf79 100755 --- a/test/lib/ansible_test/_data/sanity/code-smell/shebang.py +++ b/test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.py @@ -71,6 +71,8 @@ def main(): is_module = True elif path.startswith('test/lib/ansible_test/_data/'): pass + elif path.startswith('test/lib/ansible_test/_util/'): + pass elif path.startswith('lib/') or path.startswith('test/lib/'): if executable: print('%s:%d:%d: should not be executable' % (path, 0, 0)) diff --git a/test/lib/ansible_test/_data/sanity/code-smell/symlinks.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/symlinks.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/symlinks.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/symlinks.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.py diff --git a/test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.json b/test/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.json similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.json rename to test/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.json diff --git a/test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py b/test/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py rename to test/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.py diff --git a/test/lib/ansible_test/_data/sanity/integration-aliases/yaml_to_json.py b/test/lib/ansible_test/_util/controller/sanity/integration-aliases/yaml_to_json.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/integration-aliases/yaml_to_json.py rename to test/lib/ansible_test/_util/controller/sanity/integration-aliases/yaml_to_json.py diff --git a/test/lib/ansible_test/_data/sanity/pep8/current-ignore.txt b/test/lib/ansible_test/_util/controller/sanity/pep8/current-ignore.txt similarity index 100% rename from test/lib/ansible_test/_data/sanity/pep8/current-ignore.txt rename to test/lib/ansible_test/_util/controller/sanity/pep8/current-ignore.txt diff --git a/test/lib/ansible_test/_data/sanity/pslint/pslint.ps1 b/test/lib/ansible_test/_util/controller/sanity/pslint/pslint.ps1 similarity index 100% rename from test/lib/ansible_test/_data/sanity/pslint/pslint.ps1 rename to test/lib/ansible_test/_util/controller/sanity/pslint/pslint.ps1 diff --git a/test/lib/ansible_test/_data/sanity/pslint/settings.psd1 b/test/lib/ansible_test/_util/controller/sanity/pslint/settings.psd1 similarity index 100% rename from test/lib/ansible_test/_data/sanity/pslint/settings.psd1 rename to test/lib/ansible_test/_util/controller/sanity/pslint/settings.psd1 diff --git a/test/lib/ansible_test/_data/sanity/pylint/config/ansible-test.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/config/ansible-test.cfg rename to test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg diff --git a/test/lib/ansible_test/_data/sanity/pylint/config/collection.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/config/collection.cfg rename to test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg diff --git a/test/lib/ansible_test/_data/sanity/pylint/config/default.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/config/default.cfg rename to test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg diff --git a/test/lib/ansible_test/_data/sanity/pylint/config/sanity.cfg b/test/lib/ansible_test/_util/controller/sanity/pylint/config/sanity.cfg similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/config/sanity.cfg rename to test/lib/ansible_test/_util/controller/sanity/pylint/config/sanity.cfg diff --git a/test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py rename to test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py diff --git a/test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py rename to test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py diff --git a/test/lib/ansible_test/_data/sanity/pylint/plugins/unwanted.py b/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/pylint/plugins/unwanted.py rename to test/lib/ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py diff --git a/test/lib/ansible_test/_data/sanity/shellcheck/exclude.txt b/test/lib/ansible_test/_util/controller/sanity/shellcheck/exclude.txt similarity index 100% rename from test/lib/ansible_test/_data/sanity/shellcheck/exclude.txt rename to test/lib/ansible_test/_util/controller/sanity/shellcheck/exclude.txt diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/main.py b/test/lib/ansible_test/_util/controller/sanity/validate-modules/main.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/main.py rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/main.py diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate-modules b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate-modules similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate-modules rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate-modules diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/__init__.py b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/__init__.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/__init__.py rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/__init__.py diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/module_args.py b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/module_args.py rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/ps_argspec.ps1 b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/ps_argspec.ps1 similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/ps_argspec.ps1 rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/ps_argspec.ps1 diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py diff --git a/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/utils.py b/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/utils.py rename to test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py diff --git a/test/lib/ansible_test/_data/sanity/yamllint/config/default.yml b/test/lib/ansible_test/_util/controller/sanity/yamllint/config/default.yml similarity index 100% rename from test/lib/ansible_test/_data/sanity/yamllint/config/default.yml rename to test/lib/ansible_test/_util/controller/sanity/yamllint/config/default.yml diff --git a/test/lib/ansible_test/_data/sanity/yamllint/config/modules.yml b/test/lib/ansible_test/_util/controller/sanity/yamllint/config/modules.yml similarity index 100% rename from test/lib/ansible_test/_data/sanity/yamllint/config/modules.yml rename to test/lib/ansible_test/_util/controller/sanity/yamllint/config/modules.yml diff --git a/test/lib/ansible_test/_data/sanity/yamllint/config/plugins.yml b/test/lib/ansible_test/_util/controller/sanity/yamllint/config/plugins.yml similarity index 100% rename from test/lib/ansible_test/_data/sanity/yamllint/config/plugins.yml rename to test/lib/ansible_test/_util/controller/sanity/yamllint/config/plugins.yml diff --git a/test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py b/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py rename to test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py diff --git a/test/lib/ansible_test/_data/collection_detail.py b/test/lib/ansible_test/_util/controller/tools/collection_detail.py similarity index 100% rename from test/lib/ansible_test/_data/collection_detail.py rename to test/lib/ansible_test/_util/controller/tools/collection_detail.py diff --git a/test/lib/ansible_test/_data/coverage_stub.ps1 b/test/lib/ansible_test/_util/controller/tools/coverage_stub.ps1 similarity index 100% rename from test/lib/ansible_test/_data/coverage_stub.ps1 rename to test/lib/ansible_test/_util/controller/tools/coverage_stub.ps1 diff --git a/test/lib/ansible_test/_data/quiet_pip.py b/test/lib/ansible_test/_util/controller/tools/quiet_pip.py similarity index 100% rename from test/lib/ansible_test/_data/quiet_pip.py rename to test/lib/ansible_test/_util/controller/tools/quiet_pip.py diff --git a/test/lib/ansible_test/_data/sslcheck.py b/test/lib/ansible_test/_util/controller/tools/sslcheck.py similarity index 100% rename from test/lib/ansible_test/_data/sslcheck.py rename to test/lib/ansible_test/_util/controller/tools/sslcheck.py diff --git a/test/lib/ansible_test/_data/versions.py b/test/lib/ansible_test/_util/controller/tools/versions.py similarity index 100% rename from test/lib/ansible_test/_data/versions.py rename to test/lib/ansible_test/_util/controller/tools/versions.py diff --git a/test/lib/ansible_test/_data/virtualenvcheck.py b/test/lib/ansible_test/_util/controller/tools/virtualenvcheck.py similarity index 100% rename from test/lib/ansible_test/_data/virtualenvcheck.py rename to test/lib/ansible_test/_util/controller/tools/virtualenvcheck.py diff --git a/test/lib/ansible_test/_data/yamlcheck.py b/test/lib/ansible_test/_util/controller/tools/yamlcheck.py similarity index 100% rename from test/lib/ansible_test/_data/yamlcheck.py rename to test/lib/ansible_test/_util/controller/tools/yamlcheck.py diff --git a/test/lib/ansible_test/_data/injector/ansible b/test/lib/ansible_test/_util/target/injector/ansible similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible rename to test/lib/ansible_test/_util/target/injector/ansible diff --git a/test/lib/ansible_test/_data/injector/ansible-config b/test/lib/ansible_test/_util/target/injector/ansible-config similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-config rename to test/lib/ansible_test/_util/target/injector/ansible-config diff --git a/test/lib/ansible_test/_data/injector/ansible-connection b/test/lib/ansible_test/_util/target/injector/ansible-connection similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-connection rename to test/lib/ansible_test/_util/target/injector/ansible-connection diff --git a/test/lib/ansible_test/_data/injector/ansible-console b/test/lib/ansible_test/_util/target/injector/ansible-console similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-console rename to test/lib/ansible_test/_util/target/injector/ansible-console diff --git a/test/lib/ansible_test/_data/injector/ansible-doc b/test/lib/ansible_test/_util/target/injector/ansible-doc similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-doc rename to test/lib/ansible_test/_util/target/injector/ansible-doc diff --git a/test/lib/ansible_test/_data/injector/ansible-galaxy b/test/lib/ansible_test/_util/target/injector/ansible-galaxy similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-galaxy rename to test/lib/ansible_test/_util/target/injector/ansible-galaxy diff --git a/test/lib/ansible_test/_data/injector/ansible-inventory b/test/lib/ansible_test/_util/target/injector/ansible-inventory similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-inventory rename to test/lib/ansible_test/_util/target/injector/ansible-inventory diff --git a/test/lib/ansible_test/_data/injector/ansible-playbook b/test/lib/ansible_test/_util/target/injector/ansible-playbook similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-playbook rename to test/lib/ansible_test/_util/target/injector/ansible-playbook diff --git a/test/lib/ansible_test/_data/injector/ansible-pull b/test/lib/ansible_test/_util/target/injector/ansible-pull similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-pull rename to test/lib/ansible_test/_util/target/injector/ansible-pull diff --git a/test/lib/ansible_test/_data/injector/ansible-test b/test/lib/ansible_test/_util/target/injector/ansible-test similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-test rename to test/lib/ansible_test/_util/target/injector/ansible-test diff --git a/test/lib/ansible_test/_data/injector/ansible-vault b/test/lib/ansible_test/_util/target/injector/ansible-vault similarity index 100% rename from test/lib/ansible_test/_data/injector/ansible-vault rename to test/lib/ansible_test/_util/target/injector/ansible-vault diff --git a/test/lib/ansible_test/_data/injector/importer.py b/test/lib/ansible_test/_util/target/injector/importer.py similarity index 100% rename from test/lib/ansible_test/_data/injector/importer.py rename to test/lib/ansible_test/_util/target/injector/importer.py diff --git a/test/lib/ansible_test/_data/injector/pytest b/test/lib/ansible_test/_util/target/injector/pytest similarity index 100% rename from test/lib/ansible_test/_data/injector/pytest rename to test/lib/ansible_test/_util/target/injector/pytest diff --git a/test/lib/ansible_test/_data/injector/python.py b/test/lib/ansible_test/_util/target/injector/python.py similarity index 100% rename from test/lib/ansible_test/_data/injector/python.py rename to test/lib/ansible_test/_util/target/injector/python.py diff --git a/test/lib/ansible_test/_data/injector/virtualenv.sh b/test/lib/ansible_test/_util/target/injector/virtualenv.sh similarity index 100% rename from test/lib/ansible_test/_data/injector/virtualenv.sh rename to test/lib/ansible_test/_util/target/injector/virtualenv.sh diff --git a/test/lib/ansible_test/_data/legacy_collection_loader/__init__.py b/test/lib/ansible_test/_util/target/legacy_collection_loader/__init__.py similarity index 95% rename from test/lib/ansible_test/_data/legacy_collection_loader/__init__.py rename to test/lib/ansible_test/_util/target/legacy_collection_loader/__init__.py index b63c239d20e..21c49c47305 100644 --- a/test/lib/ansible_test/_data/legacy_collection_loader/__init__.py +++ b/test/lib/ansible_test/_util/target/legacy_collection_loader/__init__.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/test/lib/ansible_test/_data/legacy_collection_loader/_collection_config.py b/test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_config.py similarity index 98% rename from test/lib/ansible_test/_data/legacy_collection_loader/_collection_config.py rename to test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_config.py index c0680942b4f..a20319319ce 100644 --- a/test/lib/ansible_test/_data/legacy_collection_loader/_collection_config.py +++ b/test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_config.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/test/lib/ansible_test/_data/legacy_collection_loader/_collection_finder.py b/test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_finder.py similarity index 99% rename from test/lib/ansible_test/_data/legacy_collection_loader/_collection_finder.py rename to test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_finder.py index 8c1cc57d9c2..8b4b1b98d4a 100644 --- a/test/lib/ansible_test/_data/legacy_collection_loader/_collection_finder.py +++ b/test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_finder.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/test/lib/ansible_test/_data/legacy_collection_loader/_collection_meta.py b/test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_meta.py similarity index 96% rename from test/lib/ansible_test/_data/legacy_collection_loader/_collection_meta.py rename to test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_meta.py index dd36c3651e7..3a971978b75 100644 --- a/test/lib/ansible_test/_data/legacy_collection_loader/_collection_meta.py +++ b/test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_meta.py @@ -6,7 +6,7 @@ # # 1) The controller implementation resides in the "lib/ansible/utils/collection_loader/" directory. # It must function on all Python versions supported on the controller. -# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_data/legacy_collection_loader/" directory. +# 2) The ansible-test implementation resides in the "test/lib/ansible_test/_util/target/legacy_collection_loader/" directory. # It must function on all Python versions supported on managed hosts which are not supported by the controller. from __future__ import (absolute_import, division, print_function) diff --git a/test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py b/test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py similarity index 100% rename from test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py rename to test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py diff --git a/test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_coverage.py b/test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py similarity index 100% rename from test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_coverage.py rename to test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py diff --git a/test/lib/ansible_test/_data/sanity/compile/compile.py b/test/lib/ansible_test/_util/target/sanity/compile/compile.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/compile/compile.py rename to test/lib/ansible_test/_util/target/sanity/compile/compile.py diff --git a/test/lib/ansible_test/_data/sanity/import/importer.py b/test/lib/ansible_test/_util/target/sanity/import/importer.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/import/importer.py rename to test/lib/ansible_test/_util/target/sanity/import/importer.py diff --git a/test/lib/ansible_test/_data/sanity/import/yaml_to_json.py b/test/lib/ansible_test/_util/target/sanity/import/yaml_to_json.py similarity index 100% rename from test/lib/ansible_test/_data/sanity/import/yaml_to_json.py rename to test/lib/ansible_test/_util/target/sanity/import/yaml_to_json.py diff --git a/test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1 b/test/lib/ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 similarity index 100% rename from test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1 rename to test/lib/ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 diff --git a/test/lib/ansible_test/_data/setup/docker.sh b/test/lib/ansible_test/_util/target/setup/docker.sh similarity index 100% rename from test/lib/ansible_test/_data/setup/docker.sh rename to test/lib/ansible_test/_util/target/setup/docker.sh diff --git a/test/lib/ansible_test/_data/setup/remote.sh b/test/lib/ansible_test/_util/target/setup/remote.sh similarity index 100% rename from test/lib/ansible_test/_data/setup/remote.sh rename to test/lib/ansible_test/_util/target/setup/remote.sh diff --git a/test/lib/ansible_test/_data/setup/ssh-keys.sh b/test/lib/ansible_test/_util/target/setup/ssh-keys.sh similarity index 100% rename from test/lib/ansible_test/_data/setup/ssh-keys.sh rename to test/lib/ansible_test/_util/target/setup/ssh-keys.sh diff --git a/test/sanity/code-smell/configure-remoting-ps1.py b/test/sanity/code-smell/configure-remoting-ps1.py index 51dff20c583..159004c06b4 100755 --- a/test/sanity/code-smell/configure-remoting-ps1.py +++ b/test/sanity/code-smell/configure-remoting-ps1.py @@ -11,7 +11,7 @@ def main(): # required to be packaged with ansible-test and must match the original file, but cannot be a symbolic link # the packaged version is needed to run tests when ansible-test has been installed # keeping the packaged version identical to the original makes sure tests cover both files - packaged = 'test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1' + packaged = 'test/lib/ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1' copy_valid = False diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index bef9f87a60c..22ffadd21d1 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -186,7 +186,7 @@ test/integration/targets/win_script/files/test_script_with_splatting.ps1 pslint: test/integration/targets/windows-minimal/library/win_ping_syntax_error.ps1 pslint!skip test/lib/ansible_test/_data/requirements/integration.cloud.azure.txt test-constraints test/lib/ansible_test/_data/requirements/sanity.ps1 pslint:PSCustomUseLiteralPath # Uses wildcards on purpose -test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1 pslint:PSCustomUseLiteralPath +test/lib/ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 pslint:PSCustomUseLiteralPath test/support/integration/plugins/inventory/aws_ec2.py pylint:use-a-generator test/support/integration/plugins/module_utils/network/common/utils.py pylint:use-a-generator test/support/integration/plugins/modules/ec2_group.py pylint:use-a-generator