summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2021-08-12 15:07:06 -0700
committerGitHub <noreply@github.com>2021-08-12 15:07:06 -0700
commit99a79e1969472ab4ba5c0bd0cab61927b9aa93d9 (patch)
treeeff0efdf8d721c836a4081191039d2dfcfde68fd
parent394860560a553e85e1934699bbab1ba615922c85 (diff)
downloadansible-99a79e1969472ab4ba5c0bd0cab61927b9aa93d9.tar.gz
ansible-test - Move code from _data to _util. (#75495)
* Update paths to match relocated files. * Update ansible-test symlink paths. * Update path classification. * Update MANIFEST.in * Update sanity test context paths. * Update sanity ignores. * Update shebang sanity test. * Update configure-remoting-ps1 sanity test. * Update BOTMETA.yml to reflect new paths. * Update paths in collection loader comments. * Update Makefile for ansible-test. * Update docs. * Add changelog fragment.
-rw-r--r--.github/BOTMETA.yml6
-rw-r--r--MANIFEST.in7
l---------bin/ansible-test2
-rw-r--r--changelogs/fragments/ansible-test-utils.yml2
-rw-r--r--docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst2
-rw-r--r--docs/docsite/rst/dev_guide/testing/sanity/obsolete-files.rst2
-rw-r--r--docs/docsite/rst/dev_guide/testing_validate-modules.rst2
-rw-r--r--lib/ansible/utils/collection_loader/__init__.py2
-rw-r--r--lib/ansible/utils/collection_loader/_collection_config.py2
-rw-r--r--lib/ansible/utils/collection_loader/_collection_finder.py2
-rw-r--r--lib/ansible/utils/collection_loader/_collection_meta.py2
-rw-r--r--test/ansible_test/Makefile2
-rw-r--r--test/lib/ansible_test/_internal/ansible_util.py8
-rw-r--r--test/lib/ansible_test/_internal/classification/__init__.py30
-rw-r--r--test/lib/ansible_test/_internal/classification/python.py3
-rw-r--r--test/lib/ansible_test/_internal/commands/coverage/combine.py4
-rw-r--r--test/lib/ansible_test/_internal/commands/integration/__init__.py4
-rw-r--r--test/lib/ansible_test/_internal/commands/sanity/__init__.py6
-rw-r--r--test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py4
-rw-r--r--test/lib/ansible_test/_internal/commands/sanity/compile.py4
-rw-r--r--test/lib/ansible_test/_internal/commands/sanity/import.py6
-rw-r--r--test/lib/ansible_test/_internal/commands/sanity/pylint.py7
-rw-r--r--test/lib/ansible_test/_internal/commands/units/__init__.py5
-rw-r--r--test/lib/ansible_test/_internal/core_ci.py4
-rw-r--r--test/lib/ansible_test/_internal/delegation.py4
-rw-r--r--test/lib/ansible_test/_internal/executor.py3
-rw-r--r--test/lib/ansible_test/_internal/manage_ci.py6
-rw-r--r--test/lib/ansible_test/_internal/payload.py2
-rw-r--r--test/lib/ansible_test/_internal/util.py8
-rw-r--r--test/lib/ansible_test/_internal/util_common.py3
-rw-r--r--test/lib/ansible_test/_internal/venv.py4
-rwxr-xr-xtest/lib/ansible_test/_util/controller/cli/ansible_test_cli_stub.py (renamed from test/lib/ansible_test/_data/cli/ansible_test_cli_stub.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/changelog.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/changelog.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/changelog.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/changelog.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/changelog/sphinx.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/changelog/sphinx.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/empty-init.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/empty-init.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/future-import-boilerplate.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/line-endings.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/line-endings.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/metaclass-boilerplate.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-assert.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-assert.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-basestring.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-basestring.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-basestring.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iteritems.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-iterkeys.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-dict-itervalues.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-main-display.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-main-display.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-main-display.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/no-unicode-literals.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/runtime-metadata.py)3
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/shebang.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/shebang.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/shebang.py)2
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/symlinks.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/symlinks.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.json (renamed from test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.json)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.py (renamed from test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/integration-aliases/yaml_to_json.py (renamed from test/lib/ansible_test/_data/sanity/integration-aliases/yaml_to_json.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pep8/current-ignore.txt (renamed from test/lib/ansible_test/_data/sanity/pep8/current-ignore.txt)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/pslint/pslint.ps1 (renamed from test/lib/ansible_test/_data/sanity/pslint/pslint.ps1)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pslint/settings.psd1 (renamed from test/lib/ansible_test/_data/sanity/pslint/settings.psd1)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/ansible-test.cfg (renamed from test/lib/ansible_test/_data/sanity/pylint/config/ansible-test.cfg)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/collection.cfg (renamed from test/lib/ansible_test/_data/sanity/pylint/config/collection.cfg)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/default.cfg (renamed from test/lib/ansible_test/_data/sanity/pylint/config/default.cfg)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/config/sanity.cfg (renamed from test/lib/ansible_test/_data/sanity/pylint/config/sanity.cfg)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py (renamed from test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py (renamed from test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py (renamed from test/lib/ansible_test/_data/sanity/pylint/plugins/unwanted.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/shellcheck/exclude.txt (renamed from test/lib/ansible_test/_data/sanity/shellcheck/exclude.txt)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/validate-modules/main.py (renamed from test/lib/ansible_test/_data/sanity/validate-modules/main.py)0
l---------test/lib/ansible_test/_util/controller/sanity/validate-modules/validate-modules (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate-modules)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/__init__.py (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/__init__.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/module_args.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/ps_argspec.ps1 (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/ps_argspec.ps1)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py (renamed from test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/utils.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/yamllint/config/default.yml (renamed from test/lib/ansible_test/_data/sanity/yamllint/config/default.yml)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/yamllint/config/modules.yml (renamed from test/lib/ansible_test/_data/sanity/yamllint/config/modules.yml)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/yamllint/config/plugins.yml (renamed from test/lib/ansible_test/_data/sanity/yamllint/config/plugins.yml)0
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py (renamed from test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/tools/collection_detail.py (renamed from test/lib/ansible_test/_data/collection_detail.py)0
-rw-r--r--test/lib/ansible_test/_util/controller/tools/coverage_stub.ps1 (renamed from test/lib/ansible_test/_data/coverage_stub.ps1)0
-rw-r--r--test/lib/ansible_test/_util/controller/tools/quiet_pip.py (renamed from test/lib/ansible_test/_data/quiet_pip.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/tools/sslcheck.py (renamed from test/lib/ansible_test/_data/sslcheck.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/tools/versions.py (renamed from test/lib/ansible_test/_data/versions.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/tools/virtualenvcheck.py (renamed from test/lib/ansible_test/_data/virtualenvcheck.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/controller/tools/yamlcheck.py (renamed from test/lib/ansible_test/_data/yamlcheck.py)0
l---------test/lib/ansible_test/_util/target/injector/ansible (renamed from test/lib/ansible_test/_data/injector/ansible)0
l---------test/lib/ansible_test/_util/target/injector/ansible-config (renamed from test/lib/ansible_test/_data/injector/ansible-config)0
l---------test/lib/ansible_test/_util/target/injector/ansible-connection (renamed from test/lib/ansible_test/_data/injector/ansible-connection)0
l---------test/lib/ansible_test/_util/target/injector/ansible-console (renamed from test/lib/ansible_test/_data/injector/ansible-console)0
l---------test/lib/ansible_test/_util/target/injector/ansible-doc (renamed from test/lib/ansible_test/_data/injector/ansible-doc)0
l---------test/lib/ansible_test/_util/target/injector/ansible-galaxy (renamed from test/lib/ansible_test/_data/injector/ansible-galaxy)0
l---------test/lib/ansible_test/_util/target/injector/ansible-inventory (renamed from test/lib/ansible_test/_data/injector/ansible-inventory)0
l---------test/lib/ansible_test/_util/target/injector/ansible-playbook (renamed from test/lib/ansible_test/_data/injector/ansible-playbook)0
l---------test/lib/ansible_test/_util/target/injector/ansible-pull (renamed from test/lib/ansible_test/_data/injector/ansible-pull)0
l---------test/lib/ansible_test/_util/target/injector/ansible-test (renamed from test/lib/ansible_test/_data/injector/ansible-test)0
l---------test/lib/ansible_test/_util/target/injector/ansible-vault (renamed from test/lib/ansible_test/_data/injector/ansible-vault)0
l---------test/lib/ansible_test/_util/target/injector/importer.py (renamed from test/lib/ansible_test/_data/injector/importer.py)0
l---------test/lib/ansible_test/_util/target/injector/pytest (renamed from test/lib/ansible_test/_data/injector/pytest)0
-rwxr-xr-xtest/lib/ansible_test/_util/target/injector/python.py (renamed from test/lib/ansible_test/_data/injector/python.py)0
-rw-r--r--test/lib/ansible_test/_util/target/injector/virtualenv.sh (renamed from test/lib/ansible_test/_data/injector/virtualenv.sh)0
-rw-r--r--test/lib/ansible_test/_util/target/legacy_collection_loader/__init__.py (renamed from test/lib/ansible_test/_data/legacy_collection_loader/__init__.py)2
-rw-r--r--test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_config.py (renamed from test/lib/ansible_test/_data/legacy_collection_loader/_collection_config.py)2
-rw-r--r--test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_finder.py (renamed from test/lib/ansible_test/_data/legacy_collection_loader/_collection_finder.py)2
-rw-r--r--test/lib/ansible_test/_util/target/legacy_collection_loader/_collection_meta.py (renamed from test/lib/ansible_test/_data/legacy_collection_loader/_collection_meta.py)2
-rw-r--r--test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py (renamed from test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py)0
-rw-r--r--test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py (renamed from test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_coverage.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/target/sanity/compile/compile.py (renamed from test/lib/ansible_test/_data/sanity/compile/compile.py)0
-rwxr-xr-xtest/lib/ansible_test/_util/target/sanity/import/importer.py (renamed from test/lib/ansible_test/_data/sanity/import/importer.py)0
-rw-r--r--test/lib/ansible_test/_util/target/sanity/import/yaml_to_json.py (renamed from test/lib/ansible_test/_data/sanity/import/yaml_to_json.py)0
-rw-r--r--test/lib/ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1 (renamed from test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1)0
-rw-r--r--test/lib/ansible_test/_util/target/setup/docker.sh (renamed from test/lib/ansible_test/_data/setup/docker.sh)0
-rw-r--r--test/lib/ansible_test/_util/target/setup/remote.sh (renamed from test/lib/ansible_test/_data/setup/remote.sh)0
-rw-r--r--test/lib/ansible_test/_util/target/setup/ssh-keys.sh (renamed from test/lib/ansible_test/_data/setup/ssh-keys.sh)0
-rwxr-xr-xtest/sanity/code-smell/configure-remoting-ps1.py2
-rw-r--r--test/sanity/ignore.txt2
138 files changed, 89 insertions, 76 deletions
diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml
index dd56f6565e..d9346a9b93 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 4ed9a8ecb9..9a78e75e13 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 14f009af86..a540045f64 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 0000000000..d71d36b6d7
--- /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 dcec7ed380..a8e33a7f44 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 6e2fb2a579..cb23746894 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 cba5d5d38b..80fcc95a94 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 <https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py>`_ that is used to validate the YAML blocks, such as ``DOCUMENTATION`` and ``RETURNS``.
+The ``validate-modules`` tool has a `schema.py <https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/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 b63c239d20..21c49c4730 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 c0680942b4..a20319319c 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 060cb32172..13fab8922d 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 756cd7ac6e..6baa9dca05 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 7fb2a00760..2d85e3da76 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 6570b896dd..614e8aacb7 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 69c594ae29..4a3daef701 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 0ce0367561..1e3505db5a 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<ns>[^/]*)/(?P<col>[^/]*)/', r'ansible_collections/\g<ns>/\g<col>/'),
diff --git a/test/lib/ansible_test/_internal/commands/coverage/combine.py b/test/lib/ansible_test/_internal/commands/coverage/combine.py
index f4d664608b..caa4fa92e7 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 75a504bc1a..f6e2721b60 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 58c838e862..45170ff113 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 185f22d1fa..934da9f60c 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 3577c60a33..9f92401efc 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 d3a884555c..9dfd4f3407 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 64983a4d49..e69d58b762 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 51aa804fa0..c6d520acf0 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 a48fdbe0e1..aad7d1da24 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 2ee176a1ba..53b52e1ffa 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 aeebc9749f..245589327f 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 70da398642..f8d659d8e0 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 87d6ad8134..1e6971e60b 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 db3daaa4ca..ebb9a68f31 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 eac1152234..50f804ce0f 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 49235f8662..181c01ba95 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
index d12b6334ef..d12b6334ef 100755
--- 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
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
index 12bbe0d11e..12bbe0d11e 100644
--- 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
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
index 65142e0033..65142e0033 100755
--- 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
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
index 7d19f101f2..7d19f101f2 100644
--- a/test/lib/ansible_test/_data/sanity/code-smell/changelog.json
+++ b/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
index 2ccfb24f23..2ccfb24f23 100755
--- a/test/lib/ansible_test/_data/sanity/code-smell/changelog.py
+++ b/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
index 000c29e4e9..000c29e4e9 100644
--- 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
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
index 9835f9b6c8..9835f9b6c8 100644
--- 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
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
index 8bcd7f9ed9..8bcd7f9ed9 100755
--- 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
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
index 4ebce32c8c..4ebce32c8c 100644
--- 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
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
index 81081eed7b..81081eed7b 100755
--- 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
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
index db5c3c9809..db5c3c9809 100644
--- 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
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
index 1e4212d1b8..1e4212d1b8 100755
--- 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
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
index 4ebce32c8c..4ebce32c8c 100644
--- 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
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
index 28d06f363b..28d06f363b 100755
--- 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
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
index ccee80a2f1..ccee80a2f1 100644
--- 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
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
index 78561d966e..78561d966e 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index a35650efad..a35650efad 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index e28b24f4a9..e28b24f4a9 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index 237ee5b1c1..237ee5b1c1 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index 4bf92ea990..4bf92ea990 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index c925f5b729..c925f5b729 100755
--- 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
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
index 6f13c86b30..6f13c86b30 100644
--- 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
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
index 99432ea133..99432ea133 100755
--- 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
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
index ccee80a2f1..ccee80a2f1 100644
--- 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
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
index 74a36ecc58..74a36ecc58 100755
--- 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
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
index 54d9fff587..54d9fff587 100644
--- 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
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
index e44005a55f..e44005a55f 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index e2201ab106..e2201ab106 100755
--- 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
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
index 88858aeb61..88858aeb61 100644
--- 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
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
index b2de1ba85d..b2de1ba85d 100755
--- 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
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
index 44003ec0c9..44003ec0c9 100644
--- 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
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
index 8bc5098f20..7db04ced7b 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
index 5648429eb0..5648429eb0 100644
--- a/test/lib/ansible_test/_data/sanity/code-smell/shebang.json
+++ b/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
index 7cf3cf7200..b945734cf7 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
index 6f13c86b30..6f13c86b30 100644
--- a/test/lib/ansible_test/_data/sanity/code-smell/symlinks.json
+++ b/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
index 0585c6b1e5..0585c6b1e5 100755
--- a/test/lib/ansible_test/_data/sanity/code-smell/symlinks.py
+++ b/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
index 36103051b0..36103051b0 100644
--- 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
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
index 687136dcdb..687136dcdb 100755
--- 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
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
index 776590b74d..776590b74d 100644
--- 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
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
index 49cb76c5e2..49cb76c5e2 100755
--- 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
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
index 74a45f009f..74a45f009f 100644
--- 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
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
index 659c7f59e7..659c7f59e7 100644
--- a/test/lib/ansible_test/_data/sanity/pep8/current-ignore.txt
+++ b/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
index 1ef2743acd..1ef2743acd 100755
--- a/test/lib/ansible_test/_data/sanity/pslint/pslint.ps1
+++ b/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
index 7646ec35e1..7646ec35e1 100644
--- a/test/lib/ansible_test/_data/sanity/pslint/settings.psd1
+++ b/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
index 187758f409..187758f409 100644
--- 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
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
index 31c140ccbf..31c140ccbf 100644
--- a/test/lib/ansible_test/_data/sanity/pylint/config/collection.cfg
+++ b/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
index a1275aa981..a1275aa981 100644
--- a/test/lib/ansible_test/_data/sanity/pylint/config/default.cfg
+++ b/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
index bcf9549fd7..bcf9549fd7 100644
--- a/test/lib/ansible_test/_data/sanity/pylint/config/sanity.cfg
+++ b/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
index e39e5214bf..e39e5214bf 100644
--- a/test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py
+++ b/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
index 1c22a08b97..1c22a08b97 100644
--- 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
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
index 3d9877e6a3..3d9877e6a3 100644
--- a/test/lib/ansible_test/_data/sanity/pylint/plugins/unwanted.py
+++ b/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
index 29588ddd86..29588ddd86 100644
--- a/test/lib/ansible_test/_data/sanity/shellcheck/exclude.txt
+++ b/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
index c1e2bdaaeb..c1e2bdaaeb 100755
--- a/test/lib/ansible_test/_data/sanity/validate-modules/main.py
+++ b/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
index 11a5d8e18a..11a5d8e18a 120000
--- a/test/lib/ansible_test/_data/sanity/validate-modules/validate-modules
+++ b/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
index d8ff2dc0d4..d8ff2dc0d4 100644
--- 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
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
index 9f4f5c474d..9f4f5c474d 100644
--- 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
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
index 8cd0e5e560..8cd0e5e560 100644
--- 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
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
index 5ceb9d50b7..5ceb9d50b7 100755
--- 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
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
index 07034530c1..07034530c1 100644
--- 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
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
index ac46f6669f..ac46f6669f 100644
--- 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
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
index 45d8b7adcf..45d8b7adcf 100644
--- a/test/lib/ansible_test/_data/sanity/yamllint/config/default.yml
+++ b/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
index da7e604999..da7e604999 100644
--- a/test/lib/ansible_test/_data/sanity/yamllint/config/modules.yml
+++ b/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
index 6d41813787..6d41813787 100644
--- a/test/lib/ansible_test/_data/sanity/yamllint/config/plugins.yml
+++ b/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
index b9fc73e59d..b9fc73e59d 100644
--- a/test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py
+++ b/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
index e7c883ca01..e7c883ca01 100644
--- a/test/lib/ansible_test/_data/collection_detail.py
+++ b/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
index 83c27ff73c..83c27ff73c 100644
--- a/test/lib/ansible_test/_data/coverage_stub.ps1
+++ b/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
index e1bb824646..e1bb824646 100644
--- a/test/lib/ansible_test/_data/quiet_pip.py
+++ b/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
index 37b8227936..37b8227936 100755
--- a/test/lib/ansible_test/_data/sslcheck.py
+++ b/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
index 4babef0162..4babef0162 100755
--- a/test/lib/ansible_test/_data/versions.py
+++ b/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
index 0c8f768034..0c8f768034 100755
--- a/test/lib/ansible_test/_data/virtualenvcheck.py
+++ b/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
index 591842f4ad..591842f4ad 100755
--- a/test/lib/ansible_test/_data/yamlcheck.py
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-config
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-connection
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-console
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-doc
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-galaxy
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-inventory
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-playbook
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-pull
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-test
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/ansible-vault
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/importer.py
+++ b/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
index 6bbbfe4d91..6bbbfe4d91 120000
--- a/test/lib/ansible_test/_data/injector/pytest
+++ b/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
index 1063d1f011..1063d1f011 100755
--- a/test/lib/ansible_test/_data/injector/python.py
+++ b/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
index cb19a7ce47..cb19a7ce47 100644
--- a/test/lib/ansible_test/_data/injector/virtualenv.sh
+++ b/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
index b63c239d20..21c49c4730 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
index c0680942b4..a20319319c 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
index 8c1cc57d9c..8b4b1b98d4 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
index dd36c3651e..3a971978b7 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
index c26971fc5f..c26971fc5f 100644
--- 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
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
index b05298ab0b..b05298ab0b 100644
--- 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
diff --git a/test/lib/ansible_test/_data/sanity/compile/compile.py b/test/lib/ansible_test/_util/target/sanity/compile/compile.py
index 3f6fc96260..3f6fc96260 100755
--- a/test/lib/ansible_test/_data/sanity/compile/compile.py
+++ b/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
index f0659d9b4e..f0659d9b4e 100755
--- a/test/lib/ansible_test/_data/sanity/import/importer.py
+++ b/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
index 09be9576d9..09be9576d9 100644
--- 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
diff --git a/test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1 b/test/lib/ansible_test/_util/target/setup/ConfigureRemotingForAnsible.ps1
index 7e039bb415..7e039bb415 100644
--- a/test/lib/ansible_test/_data/setup/ConfigureRemotingForAnsible.ps1
+++ b/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
index ea60e1a6f3..ea60e1a6f3 100644
--- a/test/lib/ansible_test/_data/setup/docker.sh
+++ b/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
index 9348ac6f9f..9348ac6f9f 100644
--- a/test/lib/ansible_test/_data/setup/remote.sh
+++ b/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
index 7846f3fef0..7846f3fef0 100644
--- a/test/lib/ansible_test/_data/setup/ssh-keys.sh
+++ b/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 51dff20c58..159004c06b 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 bef9f87a60..22ffadd21d 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