From d651bda12390e46c85c4487859f030ed8851867a Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 6 Aug 2019 14:43:29 -0700 Subject: [PATCH] Relocate ansible-test code. (#60147) * Initial move of `test/runner/` content. `test/runner/lib/` -> `test/lib/ansible_test/_internal/` `test/runner/` -> `test/lib/ansible_test/_internal/data/` * Initial move of `test/sanity/` content. `test/sanity/` -> `test/lib/ansible_test/_internal/data/sanity/` (except `test/sanity/ignore.txt`) * Initial move of `test/units/pytest/` content. `test/units/pytest/` -> `test/lib/ansible_test/_internal/data/pytest/` * Follow-up move of `test/runner/unit/` content. `test/lib/ansible_test/_internal/data/unit/` -> `test/lib/ansible_test/tests/unit/` * Initial move of `ansible.cfg` content. `test/units/ansible.cfg` -> `test/lib/ansible_test/_internal/data/units/ansible.cfg` `test/env/ansible.cfg` -> `test/lib/ansible_test/_internal/data/env/ansible.cfg` * Follow-up move of `data` directory. `test/lib/ansible_test/_internal/data/` -> `test/lib/ansible_test/_data/` * Update import statements. * Add missing __init__.py for unit tests. * Fix path references and miscellaneous issues. --- .github/BOTMETA.yml | 10 ++--- MANIFEST.in | 2 +- bin/ansible-test | 16 +++++--- .../testing/sanity/update-bundled.rst | 2 +- .../dev_guide/testing_validate-modules.rst | 2 +- hacking/report.py | 4 +- .../targets/lookup_hashi_vault/aliases | 2 +- .../playbooks/install_dependencies.yml | 2 +- .../targets/setup_remote_constraints/aliases | 2 +- .../setup_remote_constraints/tasks/main.yml | 2 +- .../ansible_test/__init__.py} | 0 .../ansible_test/_data}/completion/docker.txt | 0 .../_data}/completion/network.txt | 0 .../ansible_test/_data}/completion/remote.txt | 0 .../_data}/completion/windows.txt | 0 .../ansible_test/_data/env}/ansible.cfg | 0 .../ansible_test/_data}/injector/ansible | 0 .../_data}/injector/ansible-config | 0 .../_data}/injector/ansible-connection | 0 .../_data}/injector/ansible-console | 0 .../ansible_test/_data}/injector/ansible-doc | 0 .../_data}/injector/ansible-galaxy | 0 .../_data}/injector/ansible-inventory | 0 .../_data}/injector/ansible-playbook | 0 .../ansible_test/_data}/injector/ansible-pull | 0 .../_data}/injector/ansible-vault | 0 .../ansible_test/_data}/injector/importer.py | 0 .../ansible_test/_data}/injector/pytest | 0 .../ansible_test/_data}/injector/python.py | 0 .../_data}/injector/virtualenv-isolated.sh | 0 .../_data}/injector/virtualenv.sh | 0 .../ansible_test/_data}/pytest.ini | 0 .../plugins/ansible_pytest_collections.py | 0 .../pytest/plugins/ansible_pytest_coverage.py | 0 .../_data}/requirements/ansible-test.txt | 0 .../_data}/requirements/constraints.txt | 0 .../_data}/requirements/coverage.txt | 0 .../requirements/integration.cloud.aws.txt | 0 .../requirements/integration.cloud.azure.txt | 0 .../requirements/integration.cloud.cs.txt | 0 .../requirements/integration.cloud.hcloud.txt | 0 .../requirements/integration.cloud.nios.txt | 0 .../integration.cloud.opennebula.txt | 0 .../integration.cloud.openshift.txt | 0 .../integration.cloud.vcenter.txt | 0 .../_data}/requirements/integration.txt | 0 .../requirements/network-integration.txt | 0 .../_data}/requirements/sanity.ps1 | 0 .../_data}/requirements/sanity.txt | 0 .../_data}/requirements/units.txt | 0 .../requirements/windows-integration.txt | 0 .../ansible_test/_data/sanity}/ansible.cfg | 0 .../sanity/code-smell/action-plugin-docs.json | 0 .../sanity/code-smell/action-plugin-docs.py | 0 .../_data}/sanity/code-smell/ansible-only.txt | 0 .../sanity/code-smell/azure-requirements.json | 0 .../sanity/code-smell/azure-requirements.py | 2 +- .../_data}/sanity/code-smell/botmeta.json | 0 .../_data}/sanity/code-smell/botmeta.py | 0 .../_data}/sanity/code-smell/changelog.json | 0 .../_data}/sanity/code-smell/changelog.py | 0 .../code-smell/configure-remoting-ps1.json | 0 .../code-smell/configure-remoting-ps1.py | 0 .../sanity/code-smell/deprecated-config.json | 0 .../sanity/code-smell/deprecated-config.py | 0 .../_data}/sanity/code-smell/docs-build.json | 0 .../_data}/sanity/code-smell/docs-build.py | 0 .../_data}/sanity/code-smell/empty-init.json | 0 .../_data}/sanity/code-smell/empty-init.py | 0 .../code-smell/future-import-boilerplate.json | 0 .../code-smell/future-import-boilerplate.py | 0 .../sanity/code-smell/line-endings.json | 0 .../_data}/sanity/code-smell/line-endings.py | 0 .../code-smell/metaclass-boilerplate.json | 0 .../code-smell/metaclass-boilerplate.py | 0 .../_data}/sanity/code-smell/no-assert.json | 0 .../_data}/sanity/code-smell/no-assert.py | 0 .../sanity/code-smell/no-basestring.json | 0 .../_data}/sanity/code-smell/no-basestring.py | 0 .../sanity/code-smell/no-dict-iteritems.json | 0 .../sanity/code-smell/no-dict-iteritems.py | 0 .../sanity/code-smell/no-dict-iterkeys.json | 0 .../sanity/code-smell/no-dict-iterkeys.py | 0 .../sanity/code-smell/no-dict-itervalues.json | 0 .../sanity/code-smell/no-dict-itervalues.py | 0 .../sanity/code-smell/no-get-exception.json | 0 .../sanity/code-smell/no-get-exception.py | 0 .../code-smell/no-illegal-filenames.json | 0 .../sanity/code-smell/no-illegal-filenames.py | 0 .../sanity/code-smell/no-main-display.json | 0 .../sanity/code-smell/no-main-display.py | 0 .../sanity/code-smell/no-smart-quotes.json | 0 .../sanity/code-smell/no-smart-quotes.py | 0 .../code-smell/no-unicode-literals.json | 0 .../sanity/code-smell/no-unicode-literals.py | 0 .../sanity/code-smell/no-unwanted-files.json | 0 .../sanity/code-smell/no-unwanted-files.py | 0 .../sanity/code-smell/package-data.json | 0 .../_data}/sanity/code-smell/package-data.py | 0 .../sanity/code-smell/replace-urlopen.json | 0 .../sanity/code-smell/replace-urlopen.py | 0 .../required-and-default-attributes.json | 0 .../required-and-default-attributes.py | 0 .../_data}/sanity/code-smell/shebang.json | 0 .../_data}/sanity/code-smell/shebang.py | 4 +- .../_data}/sanity/code-smell/skip.txt | 0 .../_data}/sanity/code-smell/symlinks.json | 0 .../_data}/sanity/code-smell/symlinks.py | 0 .../sanity/code-smell/test-constraints.json | 2 +- .../sanity/code-smell/test-constraints.py | 2 +- .../sanity/code-smell/update-bundled.json | 0 .../sanity/code-smell/update-bundled.py | 2 +- .../code-smell/use-argspec-type-path.json | 0 .../code-smell/use-argspec-type-path.py | 0 .../sanity/code-smell/use-compat-six.json | 0 .../sanity/code-smell/use-compat-six.py | 0 .../_data}/sanity/compile/compile.py | 0 .../_data}/sanity/import/importer.py | 2 +- .../_data}/sanity/pep8/current-ignore.txt | 0 .../_data}/sanity/pslint/pslint.ps1 | 0 .../_data}/sanity/pslint/settings.psd1 | 0 .../_data}/sanity/pylint/config/ansible-test | 0 .../_data}/sanity/pylint/config/collection | 0 .../_data}/sanity/pylint/config/default | 0 .../_data}/sanity/pylint/config/sanity | 0 .../_data}/sanity/pylint/plugins/blacklist.py | 0 .../sanity/pylint/plugins/deprecated.py | 0 .../sanity/pylint/plugins/string_format.py | 0 .../sanity/rstcheck/ignore-substitutions.txt | 0 .../_data}/sanity/shellcheck/exclude.txt | 0 .../sanity/validate-modules/__init__.py | 0 .../_data}/sanity/validate-modules/main.py | 0 .../sanity/validate-modules/module_args.py | 0 .../sanity/validate-modules/ps_argspec.ps1 | 0 .../_data}/sanity/validate-modules/schema.py | 0 .../test_validate_modules_regex.py | 0 .../_data}/sanity/validate-modules/utils.py | 0 .../sanity/validate-modules/validate-modules | 0 .../_data}/sanity/yamllint/config/default.yml | 0 .../_data}/sanity/yamllint/config/modules.yml | 0 .../_data}/sanity/yamllint/config/plugins.yml | 0 .../_data}/sanity/yamllint/yamllinter.py | 0 .../ansible_test/_data}/setup/docker.sh | 0 .../ansible_test/_data}/setup/remote.sh | 0 .../_data}/setup/windows-httptester.ps1 | 0 .../ansible_test/_data}/tox.ini | 0 test/lib/ansible_test/_data/units/ansible.cfg | 0 .../ansible_test/_data}/versions.py | 0 .../ansible_test/_data}/yamlcheck.py | 0 .../ansible_test/_internal}/__init__.py | 0 .../ansible_test/_internal}/ansible_util.py | 12 +++--- .../ansible_test/_internal}/cache.py | 0 .../ansible_test/_internal}/changes.py | 8 ++-- .../ansible_test/_internal}/classification.py | 28 +++++++------- .../lib => lib/ansible_test/_internal}/cli.py | 26 ++++++------- .../ansible_test/_internal}/cloud/__init__.py | 12 +++--- .../ansible_test/_internal}/cloud/acme.py | 8 ++-- .../ansible_test/_internal}/cloud/aws.py | 6 +-- .../ansible_test/_internal}/cloud/azure.py | 8 ++-- .../_internal}/cloud/cloudscale.py | 4 +- .../ansible_test/_internal}/cloud/cs.py | 8 ++-- .../ansible_test/_internal}/cloud/foreman.py | 0 .../ansible_test/_internal}/cloud/gcp.py | 4 +- .../ansible_test/_internal}/cloud/hcloud.py | 6 +-- .../ansible_test/_internal}/cloud/nios.py | 0 .../_internal}/cloud/opennebula.py | 4 +- .../_internal}/cloud/openshift.py | 8 ++-- .../ansible_test/_internal}/cloud/scaleway.py | 4 +- .../ansible_test/_internal}/cloud/tower.py | 8 ++-- .../ansible_test/_internal}/cloud/vcenter.py | 10 ++--- .../ansible_test/_internal}/cloud/vultr.py | 4 +- .../ansible_test/_internal}/config.py | 10 ++--- .../ansible_test/_internal}/constants.py | 0 .../ansible_test/_internal}/core_ci.py | 12 +++--- .../ansible_test/_internal}/cover.py | 12 +++--- .../ansible_test/_internal}/coverage_util.py | 6 +-- .../_internal}/csharp_import_analysis.py | 4 +- .../ansible_test/_internal}/data.py | 12 +++--- .../ansible_test/_internal}/delegation.py | 22 +++++------ .../ansible_test/_internal}/diff.py | 4 +- .../ansible_test/_internal}/docker_util.py | 6 +-- .../lib => lib/ansible_test/_internal}/env.py | 16 ++++---- .../ansible_test/_internal}/executor.py | 38 +++++++++---------- .../lib => lib/ansible_test/_internal}/git.py | 4 +- .../ansible_test/_internal}/http.py | 4 +- .../_internal}/import_analysis.py | 4 +- .../ansible_test/_internal}/init.py | 2 +- .../_internal}/integration/__init__.py | 16 ++++---- .../ansible_test/_internal}/manage_ci.py | 12 +++--- .../ansible_test/_internal}/metadata.py | 6 +-- .../ansible_test/_internal}/payload.py | 12 +++--- .../_internal}/powershell_import_analysis.py | 4 +- .../_internal}/provider/__init__.py | 4 +- .../_internal}/provider/layout/__init__.py | 4 +- .../_internal}/provider/layout/ansible.py | 10 +++-- .../_internal}/provider/layout/collection.py | 2 +- .../_internal}/provider/source/__init__.py | 2 +- .../_internal}/provider/source/git.py | 4 +- .../_internal}/provider/source/unversioned.py | 4 +- .../_internal}/sanity/__init__.py | 24 ++++++------ .../_internal}/sanity/ansible_doc.py | 18 ++++----- .../ansible_test/_internal}/sanity/compile.py | 12 +++--- .../ansible_test/_internal}/sanity/ignores.py | 6 +-- .../ansible_test/_internal}/sanity/import.py | 20 +++++----- .../_internal}/sanity/integration_aliases.py | 12 +++--- .../ansible_test/_internal}/sanity/pep8.py | 12 +++--- .../ansible_test/_internal}/sanity/pslint.py | 14 +++---- .../ansible_test/_internal}/sanity/pylint.py | 23 ++++++----- .../_internal}/sanity/rstcheck.py | 12 +++--- .../_internal}/sanity/sanity_docs.py | 6 +-- .../_internal}/sanity/shellcheck.py | 12 +++--- .../_internal}/sanity/validate_modules.py | 16 ++++---- .../_internal}/sanity/yamllint.py | 14 +++---- .../ansible_test/_internal}/target.py | 4 +- .../ansible_test/_internal}/test.py | 6 +-- .../ansible_test/_internal}/thread.py | 0 .../ansible_test/_internal}/types.py | 0 .../ansible_test/_internal}/util.py | 7 ++-- .../ansible_test/_internal}/util_common.py | 2 +- test/lib/ansible_test/tests/Makefile | 9 +++++ test/lib/ansible_test/tests/__init__.py | 0 test/lib/ansible_test/tests/unit/__init__.py | 0 .../ansible_test/tests}/unit/test_diff.py | 4 +- test/runner/Makefile | 9 ----- test/sanity/ignore.txt | 8 ++-- 225 files changed, 361 insertions(+), 351 deletions(-) rename test/{env/ansible.cfg => lib/ansible_test/__init__.py} (100%) rename test/{runner => lib/ansible_test/_data}/completion/docker.txt (100%) rename test/{runner => lib/ansible_test/_data}/completion/network.txt (100%) rename test/{runner => lib/ansible_test/_data}/completion/remote.txt (100%) rename test/{runner => lib/ansible_test/_data}/completion/windows.txt (100%) rename test/{sanity => lib/ansible_test/_data/env}/ansible.cfg (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-config (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-connection (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-console (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-doc (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-galaxy (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-inventory (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-playbook (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-pull (100%) rename test/{runner => lib/ansible_test/_data}/injector/ansible-vault (100%) rename test/{runner => lib/ansible_test/_data}/injector/importer.py (100%) rename test/{runner => lib/ansible_test/_data}/injector/pytest (100%) rename test/{runner => lib/ansible_test/_data}/injector/python.py (100%) rename test/{runner => lib/ansible_test/_data}/injector/virtualenv-isolated.sh (100%) rename test/{runner => lib/ansible_test/_data}/injector/virtualenv.sh (100%) rename test/{runner => lib/ansible_test/_data}/pytest.ini (100%) rename test/{units => lib/ansible_test/_data}/pytest/plugins/ansible_pytest_collections.py (100%) rename test/{units => lib/ansible_test/_data}/pytest/plugins/ansible_pytest_coverage.py (100%) rename test/{runner => lib/ansible_test/_data}/requirements/ansible-test.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/constraints.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/coverage.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.aws.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.azure.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.cs.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.hcloud.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.nios.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.opennebula.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.openshift.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.cloud.vcenter.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/integration.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/network-integration.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/sanity.ps1 (100%) rename test/{runner => lib/ansible_test/_data}/requirements/sanity.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/units.txt (100%) rename test/{runner => lib/ansible_test/_data}/requirements/windows-integration.txt (100%) rename test/{units => lib/ansible_test/_data/sanity}/ansible.cfg (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/action-plugin-docs.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/action-plugin-docs.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/ansible-only.txt (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/azure-requirements.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/azure-requirements.py (89%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/botmeta.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/botmeta.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/changelog.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/changelog.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/configure-remoting-ps1.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/configure-remoting-ps1.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/deprecated-config.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/deprecated-config.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/docs-build.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/docs-build.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/empty-init.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/empty-init.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/future-import-boilerplate.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/future-import-boilerplate.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/line-endings.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/line-endings.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/metaclass-boilerplate.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/metaclass-boilerplate.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-assert.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-assert.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-basestring.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-basestring.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-dict-iteritems.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-dict-iteritems.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-dict-iterkeys.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-dict-iterkeys.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-dict-itervalues.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-dict-itervalues.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-get-exception.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-get-exception.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-illegal-filenames.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-illegal-filenames.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-main-display.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-main-display.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-smart-quotes.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-smart-quotes.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-unicode-literals.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-unicode-literals.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-unwanted-files.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/no-unwanted-files.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/package-data.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/package-data.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/replace-urlopen.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/replace-urlopen.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/required-and-default-attributes.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/required-and-default-attributes.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/shebang.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/shebang.py (97%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/skip.txt (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/symlinks.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/symlinks.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/test-constraints.json (68%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/test-constraints.py (81%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/update-bundled.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/update-bundled.py (98%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/use-argspec-type-path.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/use-argspec-type-path.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/use-compat-six.json (100%) rename test/{ => lib/ansible_test/_data}/sanity/code-smell/use-compat-six.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/compile/compile.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/import/importer.py (99%) rename test/{ => lib/ansible_test/_data}/sanity/pep8/current-ignore.txt (100%) rename test/{ => lib/ansible_test/_data}/sanity/pslint/pslint.ps1 (100%) rename test/{ => lib/ansible_test/_data}/sanity/pslint/settings.psd1 (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/config/ansible-test (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/config/collection (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/config/default (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/config/sanity (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/plugins/blacklist.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/plugins/deprecated.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/pylint/plugins/string_format.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/rstcheck/ignore-substitutions.txt (100%) rename test/{ => lib/ansible_test/_data}/sanity/shellcheck/exclude.txt (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/__init__.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/main.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/module_args.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/ps_argspec.ps1 (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/schema.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/test_validate_modules_regex.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/utils.py (100%) rename test/{ => lib/ansible_test/_data}/sanity/validate-modules/validate-modules (100%) rename test/{ => lib/ansible_test/_data}/sanity/yamllint/config/default.yml (100%) rename test/{ => lib/ansible_test/_data}/sanity/yamllint/config/modules.yml (100%) rename test/{ => lib/ansible_test/_data}/sanity/yamllint/config/plugins.yml (100%) rename test/{ => lib/ansible_test/_data}/sanity/yamllint/yamllinter.py (100%) rename test/{runner => lib/ansible_test/_data}/setup/docker.sh (100%) rename test/{runner => lib/ansible_test/_data}/setup/remote.sh (100%) rename test/{runner => lib/ansible_test/_data}/setup/windows-httptester.ps1 (100%) rename test/{runner => lib/ansible_test/_data}/tox.ini (100%) create mode 100644 test/lib/ansible_test/_data/units/ansible.cfg rename test/{runner => lib/ansible_test/_data}/versions.py (100%) rename test/{runner => lib/ansible_test/_data}/yamlcheck.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/__init__.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/ansible_util.py (92%) rename test/{runner/lib => lib/ansible_test/_internal}/cache.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/changes.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/classification.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/cli.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/__init__.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/acme.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/aws.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/azure.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/cloudscale.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/cs.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/foreman.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/gcp.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/hcloud.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/nios.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/opennebula.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/openshift.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/scaleway.py (96%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/tower.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/vcenter.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/cloud/vultr.py (96%) rename test/{runner/lib => lib/ansible_test/_internal}/config.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/constants.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/core_ci.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/cover.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/coverage_util.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/csharp_import_analysis.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/data.py (96%) rename test/{runner/lib => lib/ansible_test/_internal}/delegation.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/diff.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/docker_util.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/env.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/executor.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/git.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/http.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/import_analysis.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/init.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/integration/__init__.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/manage_ci.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/metadata.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/payload.py (89%) rename test/{runner/lib => lib/ansible_test/_internal}/powershell_import_analysis.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/__init__.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/layout/__init__.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/layout/ansible.py (83%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/layout/collection.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/source/__init__.py (94%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/source/git.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/provider/source/unversioned.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/__init__.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/ansible_doc.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/compile.py (94%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/ignores.py (97%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/import.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/integration_aliases.py (98%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/pep8.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/pslint.py (94%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/pylint.py (96%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/rstcheck.py (94%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/sanity_docs.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/shellcheck.py (95%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/validate_modules.py (94%) rename test/{runner/lib => lib/ansible_test/_internal}/sanity/yamllint.py (94%) rename test/{runner/lib => lib/ansible_test/_internal}/target.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/test.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/thread.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/types.py (100%) rename test/{runner/lib => lib/ansible_test/_internal}/util.py (99%) rename test/{runner/lib => lib/ansible_test/_internal}/util_common.py (99%) create mode 100644 test/lib/ansible_test/tests/Makefile create mode 100644 test/lib/ansible_test/tests/__init__.py create mode 100644 test/lib/ansible_test/tests/unit/__init__.py rename test/{runner => lib/ansible_test/tests}/unit/test_diff.py (97%) delete mode 100644 test/runner/Makefile diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index ae2f4005476..bb5ec4b1372 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1464,16 +1464,16 @@ files: docs/docsite/rst/user_guide/windows: *windows_core ############################### # 'test' is a component path, then 'test' label will be automatically added - test/sanity/validate-modules: + test/lib/ansible_test/_data/sanity/validate-modules: notified: - mattclay keywords: - validate-modules - test/sanity/validate-modules/schema.py: + test/lib/ansible_test/_data/sanity/validate-modules/schema.py: notified: - gundalow - sivel - test/sanity/validate-modules/main.py: + test/lib/ansible_test/_data/sanity/validate-modules/main.py: notified: - gundalow - sivel @@ -1520,9 +1520,9 @@ files: test/integration/targets/vultr: *vultr test/legacy/: notified: mattclay - test/runner/: + test/lib/: notified: mattclay - test/runner/lib/cloud/acme.py: *crypto + test/lib/ansible_test/_internal/cloud/acme.py: *crypto test/sanity/: notified: mattclay test/units/module_utils/docker/: diff --git a/MANIFEST.in b/MANIFEST.in index 137483fa0e1..b255249608e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -23,6 +23,6 @@ include MANIFEST.in include changelogs/CHANGELOG*.rst include contrib/README.md recursive-include contrib/inventory * -exclude test/sanity/code-smell/botmeta.* +exclude test/lib/ansible_test/_data/sanity/code-smell/botmeta.* recursive-include hacking/build_library *.py include hacking/build-ansible.py diff --git a/bin/ansible-test b/bin/ansible-test index aa1c3da47b8..c7ea914c694 100755 --- a/bin/ansible-test +++ b/bin/ansible-test @@ -1,15 +1,21 @@ #!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK -"""Primary entry point for ansible-test.""" +"""Command line entry point for ansible-test.""" from __future__ import (absolute_import, division, print_function) - __metaclass__ = type import os import sys if __name__ == '__main__': - sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'test', 'runner'))) - import lib.cli - lib.cli.main() + ansible_root = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)))) + source_root = os.path.join(ansible_root, 'test', 'lib') + + if os.path.exists(os.path.join(ansible_root, 'setup.py')) and os.path.exists(os.path.join(source_root, 'ansible_test', '_internal', 'cli.py')): + # running from source, use that version of ansible-test instead of any version that may already be installed + sys.path.insert(0, source_root) + + from ansible_test._internal.cli import main + + main() diff --git a/docs/docsite/rst/dev_guide/testing/sanity/update-bundled.rst b/docs/docsite/rst/dev_guide/testing/sanity/update-bundled.rst index d8f19385b35..de255a01423 100644 --- a/docs/docsite/rst/dev_guide/testing/sanity/update-bundled.rst +++ b/docs/docsite/rst/dev_guide/testing/sanity/update-bundled.rst @@ -15,7 +15,7 @@ This test can error in the following ways: added, this error should go away. * A file has a _BUNDLED_METADATA variable but the file isn't specified in - :file:`test/sanity/code-smell/update-bundled.py`. This typically happens when a new bundled + :file:`test/lib/ansible_test/_data/sanity/code-smell/update-bundled.py`. This typically happens when a new bundled library is added. Add the file to the `get_bundled_libs()` function in the `update-bundled.py` test script to solve this error. diff --git a/docs/docsite/rst/dev_guide/testing_validate-modules.rst b/docs/docsite/rst/dev_guide/testing_validate-modules.rst index 6e22b66b3b0..28709f51df1 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/hacking/report.py b/hacking/report.py index 47f64e79841..ae4b3fb96d2 100755 --- a/hacking/report.py +++ b/hacking/report.py @@ -13,7 +13,7 @@ import sys DATABASE_PATH = os.path.expanduser('~/.ansible/report.db') BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) + '/' ANSIBLE_PATH = os.path.join(BASE_PATH, 'lib') -ANSIBLE_TEST_PATH = os.path.join(BASE_PATH, 'test/runner') +ANSIBLE_TEST_PATH = os.path.join(BASE_PATH, 'test/lib') if ANSIBLE_PATH not in sys.path: sys.path.insert(0, ANSIBLE_PATH) @@ -24,7 +24,7 @@ if ANSIBLE_TEST_PATH not in sys.path: from ansible.module_utils.urls import open_url from ansible.parsing.metadata import extract_metadata -from lib.target import walk_integration_targets +from ansible_test._internal.target import walk_integration_targets def main(): diff --git a/test/integration/targets/lookup_hashi_vault/aliases b/test/integration/targets/lookup_hashi_vault/aliases index ca01009e65f..e75e146f971 100644 --- a/test/integration/targets/lookup_hashi_vault/aliases +++ b/test/integration/targets/lookup_hashi_vault/aliases @@ -1,4 +1,4 @@ shippable/posix/group2 destructive needs/target/setup_openssl -needs/file/test/runner/requirements/constraints.txt +needs/file/test/lib/ansible_test/_data/requirements/constraints.txt diff --git a/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml b/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml index 30e2d02df01..adf6cb3d7f3 100644 --- a/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml +++ b/test/integration/targets/lookup_hashi_vault/playbooks/install_dependencies.yml @@ -17,4 +17,4 @@ - name: 'Install hvac Python package' pip: name: "{{ hvac_package|default('hvac') }}" - extra_args: "-c {{ playbook_dir }}/../../../../runner/requirements/constraints.txt" + extra_args: "-c {{ playbook_dir }}/../../../../lib/ansible_test/_data/requirements/constraints.txt" diff --git a/test/integration/targets/setup_remote_constraints/aliases b/test/integration/targets/setup_remote_constraints/aliases index f50acb2d6ac..18cc100a5e3 100644 --- a/test/integration/targets/setup_remote_constraints/aliases +++ b/test/integration/targets/setup_remote_constraints/aliases @@ -1 +1 @@ -needs/file/test/runner/requirements/constraints.txt +needs/file/test/lib/ansible_test/_data/requirements/constraints.txt diff --git a/test/integration/targets/setup_remote_constraints/tasks/main.yml b/test/integration/targets/setup_remote_constraints/tasks/main.yml index 9827267dfc5..eee09ccf64c 100644 --- a/test/integration/targets/setup_remote_constraints/tasks/main.yml +++ b/test/integration/targets/setup_remote_constraints/tasks/main.yml @@ -4,5 +4,5 @@ - name: copy constraints.txt to remote host copy: - src: "{{ role_path }}/../../../runner/requirements/constraints.txt" + src: "{{ role_path }}/../../../lib/ansible_test/_data/requirements/constraints.txt" dest: "{{ remote_constraints }}" diff --git a/test/env/ansible.cfg b/test/lib/ansible_test/__init__.py similarity index 100% rename from test/env/ansible.cfg rename to test/lib/ansible_test/__init__.py diff --git a/test/runner/completion/docker.txt b/test/lib/ansible_test/_data/completion/docker.txt similarity index 100% rename from test/runner/completion/docker.txt rename to test/lib/ansible_test/_data/completion/docker.txt diff --git a/test/runner/completion/network.txt b/test/lib/ansible_test/_data/completion/network.txt similarity index 100% rename from test/runner/completion/network.txt rename to test/lib/ansible_test/_data/completion/network.txt diff --git a/test/runner/completion/remote.txt b/test/lib/ansible_test/_data/completion/remote.txt similarity index 100% rename from test/runner/completion/remote.txt rename to test/lib/ansible_test/_data/completion/remote.txt diff --git a/test/runner/completion/windows.txt b/test/lib/ansible_test/_data/completion/windows.txt similarity index 100% rename from test/runner/completion/windows.txt rename to test/lib/ansible_test/_data/completion/windows.txt diff --git a/test/sanity/ansible.cfg b/test/lib/ansible_test/_data/env/ansible.cfg similarity index 100% rename from test/sanity/ansible.cfg rename to test/lib/ansible_test/_data/env/ansible.cfg diff --git a/test/runner/injector/ansible b/test/lib/ansible_test/_data/injector/ansible similarity index 100% rename from test/runner/injector/ansible rename to test/lib/ansible_test/_data/injector/ansible diff --git a/test/runner/injector/ansible-config b/test/lib/ansible_test/_data/injector/ansible-config similarity index 100% rename from test/runner/injector/ansible-config rename to test/lib/ansible_test/_data/injector/ansible-config diff --git a/test/runner/injector/ansible-connection b/test/lib/ansible_test/_data/injector/ansible-connection similarity index 100% rename from test/runner/injector/ansible-connection rename to test/lib/ansible_test/_data/injector/ansible-connection diff --git a/test/runner/injector/ansible-console b/test/lib/ansible_test/_data/injector/ansible-console similarity index 100% rename from test/runner/injector/ansible-console rename to test/lib/ansible_test/_data/injector/ansible-console diff --git a/test/runner/injector/ansible-doc b/test/lib/ansible_test/_data/injector/ansible-doc similarity index 100% rename from test/runner/injector/ansible-doc rename to test/lib/ansible_test/_data/injector/ansible-doc diff --git a/test/runner/injector/ansible-galaxy b/test/lib/ansible_test/_data/injector/ansible-galaxy similarity index 100% rename from test/runner/injector/ansible-galaxy rename to test/lib/ansible_test/_data/injector/ansible-galaxy diff --git a/test/runner/injector/ansible-inventory b/test/lib/ansible_test/_data/injector/ansible-inventory similarity index 100% rename from test/runner/injector/ansible-inventory rename to test/lib/ansible_test/_data/injector/ansible-inventory diff --git a/test/runner/injector/ansible-playbook b/test/lib/ansible_test/_data/injector/ansible-playbook similarity index 100% rename from test/runner/injector/ansible-playbook rename to test/lib/ansible_test/_data/injector/ansible-playbook diff --git a/test/runner/injector/ansible-pull b/test/lib/ansible_test/_data/injector/ansible-pull similarity index 100% rename from test/runner/injector/ansible-pull rename to test/lib/ansible_test/_data/injector/ansible-pull diff --git a/test/runner/injector/ansible-vault b/test/lib/ansible_test/_data/injector/ansible-vault similarity index 100% rename from test/runner/injector/ansible-vault rename to test/lib/ansible_test/_data/injector/ansible-vault diff --git a/test/runner/injector/importer.py b/test/lib/ansible_test/_data/injector/importer.py similarity index 100% rename from test/runner/injector/importer.py rename to test/lib/ansible_test/_data/injector/importer.py diff --git a/test/runner/injector/pytest b/test/lib/ansible_test/_data/injector/pytest similarity index 100% rename from test/runner/injector/pytest rename to test/lib/ansible_test/_data/injector/pytest diff --git a/test/runner/injector/python.py b/test/lib/ansible_test/_data/injector/python.py similarity index 100% rename from test/runner/injector/python.py rename to test/lib/ansible_test/_data/injector/python.py diff --git a/test/runner/injector/virtualenv-isolated.sh b/test/lib/ansible_test/_data/injector/virtualenv-isolated.sh similarity index 100% rename from test/runner/injector/virtualenv-isolated.sh rename to test/lib/ansible_test/_data/injector/virtualenv-isolated.sh diff --git a/test/runner/injector/virtualenv.sh b/test/lib/ansible_test/_data/injector/virtualenv.sh similarity index 100% rename from test/runner/injector/virtualenv.sh rename to test/lib/ansible_test/_data/injector/virtualenv.sh diff --git a/test/runner/pytest.ini b/test/lib/ansible_test/_data/pytest.ini similarity index 100% rename from test/runner/pytest.ini rename to test/lib/ansible_test/_data/pytest.ini diff --git a/test/units/pytest/plugins/ansible_pytest_collections.py b/test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py similarity index 100% rename from test/units/pytest/plugins/ansible_pytest_collections.py rename to test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py diff --git a/test/units/pytest/plugins/ansible_pytest_coverage.py b/test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_coverage.py similarity index 100% rename from test/units/pytest/plugins/ansible_pytest_coverage.py rename to test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_coverage.py diff --git a/test/runner/requirements/ansible-test.txt b/test/lib/ansible_test/_data/requirements/ansible-test.txt similarity index 100% rename from test/runner/requirements/ansible-test.txt rename to test/lib/ansible_test/_data/requirements/ansible-test.txt diff --git a/test/runner/requirements/constraints.txt b/test/lib/ansible_test/_data/requirements/constraints.txt similarity index 100% rename from test/runner/requirements/constraints.txt rename to test/lib/ansible_test/_data/requirements/constraints.txt diff --git a/test/runner/requirements/coverage.txt b/test/lib/ansible_test/_data/requirements/coverage.txt similarity index 100% rename from test/runner/requirements/coverage.txt rename to test/lib/ansible_test/_data/requirements/coverage.txt diff --git a/test/runner/requirements/integration.cloud.aws.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.aws.txt similarity index 100% rename from test/runner/requirements/integration.cloud.aws.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.aws.txt diff --git a/test/runner/requirements/integration.cloud.azure.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.azure.txt similarity index 100% rename from test/runner/requirements/integration.cloud.azure.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.azure.txt diff --git a/test/runner/requirements/integration.cloud.cs.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.cs.txt similarity index 100% rename from test/runner/requirements/integration.cloud.cs.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.cs.txt diff --git a/test/runner/requirements/integration.cloud.hcloud.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.hcloud.txt similarity index 100% rename from test/runner/requirements/integration.cloud.hcloud.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.hcloud.txt diff --git a/test/runner/requirements/integration.cloud.nios.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.nios.txt similarity index 100% rename from test/runner/requirements/integration.cloud.nios.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.nios.txt diff --git a/test/runner/requirements/integration.cloud.opennebula.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.opennebula.txt similarity index 100% rename from test/runner/requirements/integration.cloud.opennebula.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.opennebula.txt diff --git a/test/runner/requirements/integration.cloud.openshift.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.openshift.txt similarity index 100% rename from test/runner/requirements/integration.cloud.openshift.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.openshift.txt diff --git a/test/runner/requirements/integration.cloud.vcenter.txt b/test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt similarity index 100% rename from test/runner/requirements/integration.cloud.vcenter.txt rename to test/lib/ansible_test/_data/requirements/integration.cloud.vcenter.txt diff --git a/test/runner/requirements/integration.txt b/test/lib/ansible_test/_data/requirements/integration.txt similarity index 100% rename from test/runner/requirements/integration.txt rename to test/lib/ansible_test/_data/requirements/integration.txt diff --git a/test/runner/requirements/network-integration.txt b/test/lib/ansible_test/_data/requirements/network-integration.txt similarity index 100% rename from test/runner/requirements/network-integration.txt rename to test/lib/ansible_test/_data/requirements/network-integration.txt diff --git a/test/runner/requirements/sanity.ps1 b/test/lib/ansible_test/_data/requirements/sanity.ps1 similarity index 100% rename from test/runner/requirements/sanity.ps1 rename to test/lib/ansible_test/_data/requirements/sanity.ps1 diff --git a/test/runner/requirements/sanity.txt b/test/lib/ansible_test/_data/requirements/sanity.txt similarity index 100% rename from test/runner/requirements/sanity.txt rename to test/lib/ansible_test/_data/requirements/sanity.txt diff --git a/test/runner/requirements/units.txt b/test/lib/ansible_test/_data/requirements/units.txt similarity index 100% rename from test/runner/requirements/units.txt rename to test/lib/ansible_test/_data/requirements/units.txt diff --git a/test/runner/requirements/windows-integration.txt b/test/lib/ansible_test/_data/requirements/windows-integration.txt similarity index 100% rename from test/runner/requirements/windows-integration.txt rename to test/lib/ansible_test/_data/requirements/windows-integration.txt diff --git a/test/units/ansible.cfg b/test/lib/ansible_test/_data/sanity/ansible.cfg similarity index 100% rename from test/units/ansible.cfg rename to test/lib/ansible_test/_data/sanity/ansible.cfg diff --git a/test/sanity/code-smell/action-plugin-docs.json b/test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.json similarity index 100% rename from test/sanity/code-smell/action-plugin-docs.json rename to test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.json diff --git a/test/sanity/code-smell/action-plugin-docs.py b/test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py similarity index 100% rename from test/sanity/code-smell/action-plugin-docs.py rename to test/lib/ansible_test/_data/sanity/code-smell/action-plugin-docs.py diff --git a/test/sanity/code-smell/ansible-only.txt b/test/lib/ansible_test/_data/sanity/code-smell/ansible-only.txt similarity index 100% rename from test/sanity/code-smell/ansible-only.txt rename to test/lib/ansible_test/_data/sanity/code-smell/ansible-only.txt diff --git a/test/sanity/code-smell/azure-requirements.json b/test/lib/ansible_test/_data/sanity/code-smell/azure-requirements.json similarity index 100% rename from test/sanity/code-smell/azure-requirements.json rename to test/lib/ansible_test/_data/sanity/code-smell/azure-requirements.json diff --git a/test/sanity/code-smell/azure-requirements.py b/test/lib/ansible_test/_data/sanity/code-smell/azure-requirements.py similarity index 89% rename from test/sanity/code-smell/azure-requirements.py rename to test/lib/ansible_test/_data/sanity/code-smell/azure-requirements.py index 1c71b67a70e..cef84f20627 100755 --- a/test/sanity/code-smell/azure-requirements.py +++ b/test/lib/ansible_test/_data/sanity/code-smell/azure-requirements.py @@ -9,7 +9,7 @@ import os def main(): src = 'packaging/requirements/requirements-azure.txt' - dst = 'test/runner/requirements/integration.cloud.azure.txt' + dst = 'test/lib/ansible_test/_data/requirements/integration.cloud.azure.txt' missing = [p for p in [src, dst] if not os.path.isfile(p)] diff --git a/test/sanity/code-smell/botmeta.json b/test/lib/ansible_test/_data/sanity/code-smell/botmeta.json similarity index 100% rename from test/sanity/code-smell/botmeta.json rename to test/lib/ansible_test/_data/sanity/code-smell/botmeta.json diff --git a/test/sanity/code-smell/botmeta.py b/test/lib/ansible_test/_data/sanity/code-smell/botmeta.py similarity index 100% rename from test/sanity/code-smell/botmeta.py rename to test/lib/ansible_test/_data/sanity/code-smell/botmeta.py diff --git a/test/sanity/code-smell/changelog.json b/test/lib/ansible_test/_data/sanity/code-smell/changelog.json similarity index 100% rename from test/sanity/code-smell/changelog.json rename to test/lib/ansible_test/_data/sanity/code-smell/changelog.json diff --git a/test/sanity/code-smell/changelog.py b/test/lib/ansible_test/_data/sanity/code-smell/changelog.py similarity index 100% rename from test/sanity/code-smell/changelog.py rename to test/lib/ansible_test/_data/sanity/code-smell/changelog.py diff --git a/test/sanity/code-smell/configure-remoting-ps1.json b/test/lib/ansible_test/_data/sanity/code-smell/configure-remoting-ps1.json similarity index 100% rename from test/sanity/code-smell/configure-remoting-ps1.json rename to test/lib/ansible_test/_data/sanity/code-smell/configure-remoting-ps1.json diff --git a/test/sanity/code-smell/configure-remoting-ps1.py b/test/lib/ansible_test/_data/sanity/code-smell/configure-remoting-ps1.py similarity index 100% rename from test/sanity/code-smell/configure-remoting-ps1.py rename to test/lib/ansible_test/_data/sanity/code-smell/configure-remoting-ps1.py diff --git a/test/sanity/code-smell/deprecated-config.json b/test/lib/ansible_test/_data/sanity/code-smell/deprecated-config.json similarity index 100% rename from test/sanity/code-smell/deprecated-config.json rename to test/lib/ansible_test/_data/sanity/code-smell/deprecated-config.json diff --git a/test/sanity/code-smell/deprecated-config.py b/test/lib/ansible_test/_data/sanity/code-smell/deprecated-config.py similarity index 100% rename from test/sanity/code-smell/deprecated-config.py rename to test/lib/ansible_test/_data/sanity/code-smell/deprecated-config.py diff --git a/test/sanity/code-smell/docs-build.json b/test/lib/ansible_test/_data/sanity/code-smell/docs-build.json similarity index 100% rename from test/sanity/code-smell/docs-build.json rename to test/lib/ansible_test/_data/sanity/code-smell/docs-build.json diff --git a/test/sanity/code-smell/docs-build.py b/test/lib/ansible_test/_data/sanity/code-smell/docs-build.py similarity index 100% rename from test/sanity/code-smell/docs-build.py rename to test/lib/ansible_test/_data/sanity/code-smell/docs-build.py diff --git a/test/sanity/code-smell/empty-init.json b/test/lib/ansible_test/_data/sanity/code-smell/empty-init.json similarity index 100% rename from test/sanity/code-smell/empty-init.json rename to test/lib/ansible_test/_data/sanity/code-smell/empty-init.json diff --git a/test/sanity/code-smell/empty-init.py b/test/lib/ansible_test/_data/sanity/code-smell/empty-init.py similarity index 100% rename from test/sanity/code-smell/empty-init.py rename to test/lib/ansible_test/_data/sanity/code-smell/empty-init.py diff --git a/test/sanity/code-smell/future-import-boilerplate.json b/test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.json similarity index 100% rename from test/sanity/code-smell/future-import-boilerplate.json rename to test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.json diff --git a/test/sanity/code-smell/future-import-boilerplate.py b/test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py similarity index 100% rename from test/sanity/code-smell/future-import-boilerplate.py rename to test/lib/ansible_test/_data/sanity/code-smell/future-import-boilerplate.py diff --git a/test/sanity/code-smell/line-endings.json b/test/lib/ansible_test/_data/sanity/code-smell/line-endings.json similarity index 100% rename from test/sanity/code-smell/line-endings.json rename to test/lib/ansible_test/_data/sanity/code-smell/line-endings.json diff --git a/test/sanity/code-smell/line-endings.py b/test/lib/ansible_test/_data/sanity/code-smell/line-endings.py similarity index 100% rename from test/sanity/code-smell/line-endings.py rename to test/lib/ansible_test/_data/sanity/code-smell/line-endings.py diff --git a/test/sanity/code-smell/metaclass-boilerplate.json b/test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.json similarity index 100% rename from test/sanity/code-smell/metaclass-boilerplate.json rename to test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.json diff --git a/test/sanity/code-smell/metaclass-boilerplate.py b/test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py similarity index 100% rename from test/sanity/code-smell/metaclass-boilerplate.py rename to test/lib/ansible_test/_data/sanity/code-smell/metaclass-boilerplate.py diff --git a/test/sanity/code-smell/no-assert.json b/test/lib/ansible_test/_data/sanity/code-smell/no-assert.json similarity index 100% rename from test/sanity/code-smell/no-assert.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-assert.json diff --git a/test/sanity/code-smell/no-assert.py b/test/lib/ansible_test/_data/sanity/code-smell/no-assert.py similarity index 100% rename from test/sanity/code-smell/no-assert.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-assert.py diff --git a/test/sanity/code-smell/no-basestring.json b/test/lib/ansible_test/_data/sanity/code-smell/no-basestring.json similarity index 100% rename from test/sanity/code-smell/no-basestring.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-basestring.json diff --git a/test/sanity/code-smell/no-basestring.py b/test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py similarity index 100% rename from test/sanity/code-smell/no-basestring.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-basestring.py diff --git a/test/sanity/code-smell/no-dict-iteritems.json b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.json similarity index 100% rename from test/sanity/code-smell/no-dict-iteritems.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.json diff --git a/test/sanity/code-smell/no-dict-iteritems.py b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py similarity index 100% rename from test/sanity/code-smell/no-dict-iteritems.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-dict-iteritems.py diff --git a/test/sanity/code-smell/no-dict-iterkeys.json b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.json similarity index 100% rename from test/sanity/code-smell/no-dict-iterkeys.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.json diff --git a/test/sanity/code-smell/no-dict-iterkeys.py b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py similarity index 100% rename from test/sanity/code-smell/no-dict-iterkeys.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-dict-iterkeys.py diff --git a/test/sanity/code-smell/no-dict-itervalues.json b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.json similarity index 100% rename from test/sanity/code-smell/no-dict-itervalues.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.json diff --git a/test/sanity/code-smell/no-dict-itervalues.py b/test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py similarity index 100% rename from test/sanity/code-smell/no-dict-itervalues.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-dict-itervalues.py diff --git a/test/sanity/code-smell/no-get-exception.json b/test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.json similarity index 100% rename from test/sanity/code-smell/no-get-exception.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.json diff --git a/test/sanity/code-smell/no-get-exception.py b/test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py similarity index 100% rename from test/sanity/code-smell/no-get-exception.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-get-exception.py diff --git a/test/sanity/code-smell/no-illegal-filenames.json b/test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.json similarity index 100% rename from test/sanity/code-smell/no-illegal-filenames.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.json diff --git a/test/sanity/code-smell/no-illegal-filenames.py b/test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py similarity index 100% rename from test/sanity/code-smell/no-illegal-filenames.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-illegal-filenames.py diff --git a/test/sanity/code-smell/no-main-display.json b/test/lib/ansible_test/_data/sanity/code-smell/no-main-display.json similarity index 100% rename from test/sanity/code-smell/no-main-display.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-main-display.json diff --git a/test/sanity/code-smell/no-main-display.py b/test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py similarity index 100% rename from test/sanity/code-smell/no-main-display.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-main-display.py diff --git a/test/sanity/code-smell/no-smart-quotes.json b/test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.json similarity index 100% rename from test/sanity/code-smell/no-smart-quotes.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.json diff --git a/test/sanity/code-smell/no-smart-quotes.py b/test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py similarity index 100% rename from test/sanity/code-smell/no-smart-quotes.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-smart-quotes.py diff --git a/test/sanity/code-smell/no-unicode-literals.json b/test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.json similarity index 100% rename from test/sanity/code-smell/no-unicode-literals.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.json diff --git a/test/sanity/code-smell/no-unicode-literals.py b/test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py similarity index 100% rename from test/sanity/code-smell/no-unicode-literals.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-unicode-literals.py diff --git a/test/sanity/code-smell/no-unwanted-files.json b/test/lib/ansible_test/_data/sanity/code-smell/no-unwanted-files.json similarity index 100% rename from test/sanity/code-smell/no-unwanted-files.json rename to test/lib/ansible_test/_data/sanity/code-smell/no-unwanted-files.json diff --git a/test/sanity/code-smell/no-unwanted-files.py b/test/lib/ansible_test/_data/sanity/code-smell/no-unwanted-files.py similarity index 100% rename from test/sanity/code-smell/no-unwanted-files.py rename to test/lib/ansible_test/_data/sanity/code-smell/no-unwanted-files.py diff --git a/test/sanity/code-smell/package-data.json b/test/lib/ansible_test/_data/sanity/code-smell/package-data.json similarity index 100% rename from test/sanity/code-smell/package-data.json rename to test/lib/ansible_test/_data/sanity/code-smell/package-data.json diff --git a/test/sanity/code-smell/package-data.py b/test/lib/ansible_test/_data/sanity/code-smell/package-data.py similarity index 100% rename from test/sanity/code-smell/package-data.py rename to test/lib/ansible_test/_data/sanity/code-smell/package-data.py diff --git a/test/sanity/code-smell/replace-urlopen.json b/test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.json similarity index 100% rename from test/sanity/code-smell/replace-urlopen.json rename to test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.json diff --git a/test/sanity/code-smell/replace-urlopen.py b/test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py similarity index 100% rename from test/sanity/code-smell/replace-urlopen.py rename to test/lib/ansible_test/_data/sanity/code-smell/replace-urlopen.py diff --git a/test/sanity/code-smell/required-and-default-attributes.json b/test/lib/ansible_test/_data/sanity/code-smell/required-and-default-attributes.json similarity index 100% rename from test/sanity/code-smell/required-and-default-attributes.json rename to test/lib/ansible_test/_data/sanity/code-smell/required-and-default-attributes.json diff --git a/test/sanity/code-smell/required-and-default-attributes.py b/test/lib/ansible_test/_data/sanity/code-smell/required-and-default-attributes.py similarity index 100% rename from test/sanity/code-smell/required-and-default-attributes.py rename to test/lib/ansible_test/_data/sanity/code-smell/required-and-default-attributes.py diff --git a/test/sanity/code-smell/shebang.json b/test/lib/ansible_test/_data/sanity/code-smell/shebang.json similarity index 100% rename from test/sanity/code-smell/shebang.json rename to test/lib/ansible_test/_data/sanity/code-smell/shebang.json diff --git a/test/sanity/code-smell/shebang.py b/test/lib/ansible_test/_data/sanity/code-smell/shebang.py similarity index 97% rename from test/sanity/code-smell/shebang.py rename to test/lib/ansible_test/_data/sanity/code-smell/shebang.py index 02be695b71b..0c2de08cd95 100755 --- a/test/sanity/code-smell/shebang.py +++ b/test/lib/ansible_test/_data/sanity/code-smell/shebang.py @@ -64,7 +64,9 @@ def main(): if path.startswith('lib/ansible/modules/'): is_module = True - elif path.startswith('lib/') or path.startswith('test/runner/lib/'): + elif path.startswith('test/lib/ansible_test/_data/'): + 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/sanity/code-smell/skip.txt b/test/lib/ansible_test/_data/sanity/code-smell/skip.txt similarity index 100% rename from test/sanity/code-smell/skip.txt rename to test/lib/ansible_test/_data/sanity/code-smell/skip.txt diff --git a/test/sanity/code-smell/symlinks.json b/test/lib/ansible_test/_data/sanity/code-smell/symlinks.json similarity index 100% rename from test/sanity/code-smell/symlinks.json rename to test/lib/ansible_test/_data/sanity/code-smell/symlinks.json diff --git a/test/sanity/code-smell/symlinks.py b/test/lib/ansible_test/_data/sanity/code-smell/symlinks.py similarity index 100% rename from test/sanity/code-smell/symlinks.py rename to test/lib/ansible_test/_data/sanity/code-smell/symlinks.py diff --git a/test/sanity/code-smell/test-constraints.json b/test/lib/ansible_test/_data/sanity/code-smell/test-constraints.json similarity index 68% rename from test/sanity/code-smell/test-constraints.json rename to test/lib/ansible_test/_data/sanity/code-smell/test-constraints.json index 2ddf53c65f2..69b07bf3bbb 100644 --- a/test/sanity/code-smell/test-constraints.json +++ b/test/lib/ansible_test/_data/sanity/code-smell/test-constraints.json @@ -1,6 +1,6 @@ { "prefixes": [ - "test/runner/requirements/" + "test/lib/ansible_test/_data/requirements/" ], "extensions": [ ".txt" diff --git a/test/sanity/code-smell/test-constraints.py b/test/lib/ansible_test/_data/sanity/code-smell/test-constraints.py similarity index 81% rename from test/sanity/code-smell/test-constraints.py rename to test/lib/ansible_test/_data/sanity/code-smell/test-constraints.py index 82749bd99aa..e8b9c7952a8 100755 --- a/test/sanity/code-smell/test-constraints.py +++ b/test/lib/ansible_test/_data/sanity/code-smell/test-constraints.py @@ -13,7 +13,7 @@ def main(): match = re.search(r'^[^;#]*?([<>=])(?!.*sanity_ok.*)', text) if match: - print('%s:%d:%d: put constraints in `test/runner/requirements/constraints.txt`' % ( + print('%s:%d:%d: put constraints in `test/lib/ansible_test/_data/requirements/constraints.txt`' % ( path, line + 1, match.start(1) + 1)) diff --git a/test/sanity/code-smell/update-bundled.json b/test/lib/ansible_test/_data/sanity/code-smell/update-bundled.json similarity index 100% rename from test/sanity/code-smell/update-bundled.json rename to test/lib/ansible_test/_data/sanity/code-smell/update-bundled.json diff --git a/test/sanity/code-smell/update-bundled.py b/test/lib/ansible_test/_data/sanity/code-smell/update-bundled.py similarity index 98% rename from test/sanity/code-smell/update-bundled.py rename to test/lib/ansible_test/_data/sanity/code-smell/update-bundled.py index 121e225f396..3720e2f08bd 100755 --- a/test/sanity/code-smell/update-bundled.py +++ b/test/lib/ansible_test/_data/sanity/code-smell/update-bundled.py @@ -132,7 +132,7 @@ def main(): for filename in files_with_bundled_metadata.difference(bundled_libs): print('{0}: ERROR: File contains _BUNDLED_METADATA but needs to be added to' - ' test/sanity/code-smell/update-bundled.py'.format(filename)) + ' test/lib/ansible_test/_data/sanity/code-smell/update-bundled.py'.format(filename)) for filename in bundled_libs: try: diff --git a/test/sanity/code-smell/use-argspec-type-path.json b/test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.json similarity index 100% rename from test/sanity/code-smell/use-argspec-type-path.json rename to test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.json diff --git a/test/sanity/code-smell/use-argspec-type-path.py b/test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py similarity index 100% rename from test/sanity/code-smell/use-argspec-type-path.py rename to test/lib/ansible_test/_data/sanity/code-smell/use-argspec-type-path.py diff --git a/test/sanity/code-smell/use-compat-six.json b/test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.json similarity index 100% rename from test/sanity/code-smell/use-compat-six.json rename to test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.json diff --git a/test/sanity/code-smell/use-compat-six.py b/test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py similarity index 100% rename from test/sanity/code-smell/use-compat-six.py rename to test/lib/ansible_test/_data/sanity/code-smell/use-compat-six.py diff --git a/test/sanity/compile/compile.py b/test/lib/ansible_test/_data/sanity/compile/compile.py similarity index 100% rename from test/sanity/compile/compile.py rename to test/lib/ansible_test/_data/sanity/compile/compile.py diff --git a/test/sanity/import/importer.py b/test/lib/ansible_test/_data/sanity/import/importer.py similarity index 99% rename from test/sanity/import/importer.py rename to test/lib/ansible_test/_data/sanity/import/importer.py index 719341cb674..e0606950b6b 100755 --- a/test/sanity/import/importer.py +++ b/test/lib/ansible_test/_data/sanity/import/importer.py @@ -135,7 +135,7 @@ def main(): else: for result in results: if result[0].startswith(filter_dir): - source = result[0][len(base_dir) + 1:].replace('test/sanity/import/', '') + source = result[0][len(base_dir) + 1:].replace('test/lib/ansible_test/_data/sanity/import/', '') line = result[1] or 0 break diff --git a/test/sanity/pep8/current-ignore.txt b/test/lib/ansible_test/_data/sanity/pep8/current-ignore.txt similarity index 100% rename from test/sanity/pep8/current-ignore.txt rename to test/lib/ansible_test/_data/sanity/pep8/current-ignore.txt diff --git a/test/sanity/pslint/pslint.ps1 b/test/lib/ansible_test/_data/sanity/pslint/pslint.ps1 similarity index 100% rename from test/sanity/pslint/pslint.ps1 rename to test/lib/ansible_test/_data/sanity/pslint/pslint.ps1 diff --git a/test/sanity/pslint/settings.psd1 b/test/lib/ansible_test/_data/sanity/pslint/settings.psd1 similarity index 100% rename from test/sanity/pslint/settings.psd1 rename to test/lib/ansible_test/_data/sanity/pslint/settings.psd1 diff --git a/test/sanity/pylint/config/ansible-test b/test/lib/ansible_test/_data/sanity/pylint/config/ansible-test similarity index 100% rename from test/sanity/pylint/config/ansible-test rename to test/lib/ansible_test/_data/sanity/pylint/config/ansible-test diff --git a/test/sanity/pylint/config/collection b/test/lib/ansible_test/_data/sanity/pylint/config/collection similarity index 100% rename from test/sanity/pylint/config/collection rename to test/lib/ansible_test/_data/sanity/pylint/config/collection diff --git a/test/sanity/pylint/config/default b/test/lib/ansible_test/_data/sanity/pylint/config/default similarity index 100% rename from test/sanity/pylint/config/default rename to test/lib/ansible_test/_data/sanity/pylint/config/default diff --git a/test/sanity/pylint/config/sanity b/test/lib/ansible_test/_data/sanity/pylint/config/sanity similarity index 100% rename from test/sanity/pylint/config/sanity rename to test/lib/ansible_test/_data/sanity/pylint/config/sanity diff --git a/test/sanity/pylint/plugins/blacklist.py b/test/lib/ansible_test/_data/sanity/pylint/plugins/blacklist.py similarity index 100% rename from test/sanity/pylint/plugins/blacklist.py rename to test/lib/ansible_test/_data/sanity/pylint/plugins/blacklist.py diff --git a/test/sanity/pylint/plugins/deprecated.py b/test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py similarity index 100% rename from test/sanity/pylint/plugins/deprecated.py rename to test/lib/ansible_test/_data/sanity/pylint/plugins/deprecated.py diff --git a/test/sanity/pylint/plugins/string_format.py b/test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py similarity index 100% rename from test/sanity/pylint/plugins/string_format.py rename to test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py diff --git a/test/sanity/rstcheck/ignore-substitutions.txt b/test/lib/ansible_test/_data/sanity/rstcheck/ignore-substitutions.txt similarity index 100% rename from test/sanity/rstcheck/ignore-substitutions.txt rename to test/lib/ansible_test/_data/sanity/rstcheck/ignore-substitutions.txt diff --git a/test/sanity/shellcheck/exclude.txt b/test/lib/ansible_test/_data/sanity/shellcheck/exclude.txt similarity index 100% rename from test/sanity/shellcheck/exclude.txt rename to test/lib/ansible_test/_data/sanity/shellcheck/exclude.txt diff --git a/test/sanity/validate-modules/__init__.py b/test/lib/ansible_test/_data/sanity/validate-modules/__init__.py similarity index 100% rename from test/sanity/validate-modules/__init__.py rename to test/lib/ansible_test/_data/sanity/validate-modules/__init__.py diff --git a/test/sanity/validate-modules/main.py b/test/lib/ansible_test/_data/sanity/validate-modules/main.py similarity index 100% rename from test/sanity/validate-modules/main.py rename to test/lib/ansible_test/_data/sanity/validate-modules/main.py diff --git a/test/sanity/validate-modules/module_args.py b/test/lib/ansible_test/_data/sanity/validate-modules/module_args.py similarity index 100% rename from test/sanity/validate-modules/module_args.py rename to test/lib/ansible_test/_data/sanity/validate-modules/module_args.py diff --git a/test/sanity/validate-modules/ps_argspec.ps1 b/test/lib/ansible_test/_data/sanity/validate-modules/ps_argspec.ps1 similarity index 100% rename from test/sanity/validate-modules/ps_argspec.ps1 rename to test/lib/ansible_test/_data/sanity/validate-modules/ps_argspec.ps1 diff --git a/test/sanity/validate-modules/schema.py b/test/lib/ansible_test/_data/sanity/validate-modules/schema.py similarity index 100% rename from test/sanity/validate-modules/schema.py rename to test/lib/ansible_test/_data/sanity/validate-modules/schema.py diff --git a/test/sanity/validate-modules/test_validate_modules_regex.py b/test/lib/ansible_test/_data/sanity/validate-modules/test_validate_modules_regex.py similarity index 100% rename from test/sanity/validate-modules/test_validate_modules_regex.py rename to test/lib/ansible_test/_data/sanity/validate-modules/test_validate_modules_regex.py diff --git a/test/sanity/validate-modules/utils.py b/test/lib/ansible_test/_data/sanity/validate-modules/utils.py similarity index 100% rename from test/sanity/validate-modules/utils.py rename to test/lib/ansible_test/_data/sanity/validate-modules/utils.py diff --git a/test/sanity/validate-modules/validate-modules b/test/lib/ansible_test/_data/sanity/validate-modules/validate-modules similarity index 100% rename from test/sanity/validate-modules/validate-modules rename to test/lib/ansible_test/_data/sanity/validate-modules/validate-modules diff --git a/test/sanity/yamllint/config/default.yml b/test/lib/ansible_test/_data/sanity/yamllint/config/default.yml similarity index 100% rename from test/sanity/yamllint/config/default.yml rename to test/lib/ansible_test/_data/sanity/yamllint/config/default.yml diff --git a/test/sanity/yamllint/config/modules.yml b/test/lib/ansible_test/_data/sanity/yamllint/config/modules.yml similarity index 100% rename from test/sanity/yamllint/config/modules.yml rename to test/lib/ansible_test/_data/sanity/yamllint/config/modules.yml diff --git a/test/sanity/yamllint/config/plugins.yml b/test/lib/ansible_test/_data/sanity/yamllint/config/plugins.yml similarity index 100% rename from test/sanity/yamllint/config/plugins.yml rename to test/lib/ansible_test/_data/sanity/yamllint/config/plugins.yml diff --git a/test/sanity/yamllint/yamllinter.py b/test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py similarity index 100% rename from test/sanity/yamllint/yamllinter.py rename to test/lib/ansible_test/_data/sanity/yamllint/yamllinter.py diff --git a/test/runner/setup/docker.sh b/test/lib/ansible_test/_data/setup/docker.sh similarity index 100% rename from test/runner/setup/docker.sh rename to test/lib/ansible_test/_data/setup/docker.sh diff --git a/test/runner/setup/remote.sh b/test/lib/ansible_test/_data/setup/remote.sh similarity index 100% rename from test/runner/setup/remote.sh rename to test/lib/ansible_test/_data/setup/remote.sh diff --git a/test/runner/setup/windows-httptester.ps1 b/test/lib/ansible_test/_data/setup/windows-httptester.ps1 similarity index 100% rename from test/runner/setup/windows-httptester.ps1 rename to test/lib/ansible_test/_data/setup/windows-httptester.ps1 diff --git a/test/runner/tox.ini b/test/lib/ansible_test/_data/tox.ini similarity index 100% rename from test/runner/tox.ini rename to test/lib/ansible_test/_data/tox.ini diff --git a/test/lib/ansible_test/_data/units/ansible.cfg b/test/lib/ansible_test/_data/units/ansible.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/runner/versions.py b/test/lib/ansible_test/_data/versions.py similarity index 100% rename from test/runner/versions.py rename to test/lib/ansible_test/_data/versions.py diff --git a/test/runner/yamlcheck.py b/test/lib/ansible_test/_data/yamlcheck.py similarity index 100% rename from test/runner/yamlcheck.py rename to test/lib/ansible_test/_data/yamlcheck.py diff --git a/test/runner/lib/__init__.py b/test/lib/ansible_test/_internal/__init__.py similarity index 100% rename from test/runner/lib/__init__.py rename to test/lib/ansible_test/_internal/__init__.py diff --git a/test/runner/lib/ansible_util.py b/test/lib/ansible_test/_internal/ansible_util.py similarity index 92% rename from test/runner/lib/ansible_util.py rename to test/lib/ansible_test/_internal/ansible_util.py index 126b41b14f0..e36829e1dc6 100644 --- a/test/runner/lib/ansible_util.py +++ b/test/lib/ansible_test/_internal/ansible_util.py @@ -5,11 +5,11 @@ __metaclass__ = type import json import os -from lib.constants import ( +from .constants import ( SOFT_RLIMIT_NOFILE, ) -from lib.util import ( +from .util import ( common_environment, display, find_python, @@ -18,16 +18,16 @@ from lib.util import ( ANSIBLE_TEST_DATA_ROOT, ) -from lib.util_common import ( +from .util_common import ( run_command, ) -from lib.config import ( +from .config import ( IntegrationConfig, EnvironmentConfig, ) -from lib.data import ( +from .data import ( data_context, ) @@ -54,7 +54,7 @@ def ansible_environment(args, color=True, ansible_config=None): elif isinstance(args, IntegrationConfig): ansible_config = os.path.join(ANSIBLE_ROOT, 'test/integration/%s.cfg' % args.command) else: - ansible_config = os.path.join(ANSIBLE_ROOT, 'test/%s/ansible.cfg' % args.command) + ansible_config = os.path.join(ANSIBLE_TEST_DATA_ROOT, '%s/ansible.cfg' % args.command) if not args.explain and not os.path.exists(ansible_config): raise ApplicationError('Configuration not found: %s' % ansible_config) diff --git a/test/runner/lib/cache.py b/test/lib/ansible_test/_internal/cache.py similarity index 100% rename from test/runner/lib/cache.py rename to test/lib/ansible_test/_internal/cache.py diff --git a/test/runner/lib/changes.py b/test/lib/ansible_test/_internal/changes.py similarity index 98% rename from test/runner/lib/changes.py rename to test/lib/ansible_test/_internal/changes.py index 4dd50500f29..1c5d85a5d7e 100644 --- a/test/runner/lib/changes.py +++ b/test/lib/ansible_test/_internal/changes.py @@ -5,23 +5,23 @@ __metaclass__ = type import re import os -from lib.util import ( +from .util import ( ApplicationError, SubprocessError, MissingEnvironmentVariable, display, ) -from lib.util_common import ( +from .util_common import ( CommonConfig, ) -from lib.http import ( +from .http import ( HttpClient, urlencode, ) -from lib.git import ( +from .git import ( Git, ) diff --git a/test/runner/lib/classification.py b/test/lib/ansible_test/_internal/classification.py similarity index 97% rename from test/runner/lib/classification.py rename to test/lib/ansible_test/_internal/classification.py index 97bc8116bf5..5a458713d03 100644 --- a/test/runner/lib/classification.py +++ b/test/lib/ansible_test/_internal/classification.py @@ -7,7 +7,7 @@ import os import re import time -from lib.target import ( +from .target import ( walk_module_targets, walk_integration_targets, walk_units_targets, @@ -17,36 +17,36 @@ from lib.target import ( analyze_integration_target_dependencies, ) -from lib.util import ( +from .util import ( display, is_subdir, ) -from lib.import_analysis import ( +from .import_analysis import ( get_python_module_utils_imports, get_python_module_utils_name, ) -from lib.csharp_import_analysis import ( +from .csharp_import_analysis import ( get_csharp_module_utils_imports, get_csharp_module_utils_name, ) -from lib.powershell_import_analysis import ( +from .powershell_import_analysis import ( get_powershell_module_utils_imports, get_powershell_module_utils_name, ) -from lib.config import ( +from .config import ( TestConfig, IntegrationConfig, ) -from lib.metadata import ( +from .metadata import ( ChangeDescription, ) -from lib.data import ( +from .data import ( data_context, ) @@ -723,11 +723,11 @@ class PathMapper: test_path = os.path.dirname(test_path) - if path.startswith('test/runner/completion/'): - if path == 'test/runner/completion/docker.txt': + if path.startswith('test/lib/ansible_test/_data/completion/'): + if path == 'test/lib/ansible_test/_data/completion/docker.txt': return all_tests(self.args, force=True) # force all tests due to risk of breaking changes in new test environment - if path.startswith('test/runner/lib/cloud/'): + if path.startswith('test/lib/ansible_test/_internal/cloud/'): cloud_target = 'cloud/%s/' % name if cloud_target in self.integration_targets_by_alias: @@ -737,12 +737,12 @@ class PathMapper: return all_tests(self.args) # test infrastructure, run all tests - if path.startswith('test/runner/lib/sanity/'): + if path.startswith('test/lib/ansible_test/_internal/sanity/'): return { 'sanity': 'all', # test infrastructure, run all sanity checks } - if path.startswith('test/runner/requirements/'): + if path.startswith('test/lib/ansible_test/_data/requirements/'): if name in ( 'integration', 'network-integration', @@ -768,7 +768,7 @@ class PathMapper: 'integration': cloud_target, } - if path.startswith('test/runner/'): + if path.startswith('test/lib/'): return all_tests(self.args) # test infrastructure, run all tests if path.startswith('test/utils/shippable/tools/'): diff --git a/test/runner/lib/cli.py b/test/lib/ansible_test/_internal/cli.py similarity index 99% rename from test/runner/lib/cli.py rename to test/lib/ansible_test/_internal/cli.py index 64f86c0cddb..9cd2b53b3f4 100644 --- a/test/runner/lib/cli.py +++ b/test/lib/ansible_test/_internal/cli.py @@ -8,11 +8,11 @@ import sys # This import should occur as early as possible. # It must occur before subprocess has been imported anywhere in the current process. -from lib.init import ( +from .init import ( CURRENT_RLIMIT_NOFILE, ) -from lib.util import ( +from .util import ( ApplicationError, display, raw_command, @@ -24,12 +24,12 @@ from lib.util import ( ANSIBLE_TEST_DATA_ROOT, ) -from lib.delegation import ( +from .delegation import ( check_delegation_args, delegate, ) -from lib.executor import ( +from .executor import ( command_posix_integration, command_network_integration, command_windows_integration, @@ -42,7 +42,7 @@ from lib.executor import ( check_startup, ) -from lib.config import ( +from .config import ( IntegrationConfig, PosixIntegrationConfig, WindowsIntegrationConfig, @@ -52,19 +52,19 @@ from lib.config import ( ShellConfig, ) -from lib.env import ( +from .env import ( EnvConfig, command_env, configure_timeout, ) -from lib.sanity import ( +from .sanity import ( command_sanity, sanity_init, sanity_get_tests, ) -from lib.target import ( +from .target import ( find_target_completion, walk_posix_integration_targets, walk_network_integration_targets, @@ -73,23 +73,23 @@ from lib.target import ( walk_sanity_targets, ) -from lib.core_ci import ( +from .core_ci import ( AWS_ENDPOINTS, ) -from lib.cloud import ( +from .cloud import ( initialize_cloud_plugins, ) -from lib.data import ( +from .data import ( data_context, ) -from lib.util_common import ( +from .util_common import ( CommonConfig, ) -from lib.cover import ( +from .cover import ( command_coverage_combine, command_coverage_erase, command_coverage_html, diff --git a/test/runner/lib/cloud/__init__.py b/test/lib/ansible_test/_internal/cloud/__init__.py similarity index 98% rename from test/runner/lib/cloud/__init__.py rename to test/lib/ansible_test/_internal/cloud/__init__.py index 232a70d428b..b7ef15731a4 100644 --- a/test/runner/lib/cloud/__init__.py +++ b/test/lib/ansible_test/_internal/cloud/__init__.py @@ -13,9 +13,9 @@ import random import re import tempfile -import lib.types as t +from .. import types as t -from lib.util import ( +from ..util import ( ApplicationError, display, is_shippable, @@ -26,15 +26,15 @@ from lib.util import ( make_dirs, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.config import ( +from ..config import ( IntegrationConfig, ) -from lib.data import ( +from ..data import ( data_context, ) @@ -183,7 +183,7 @@ class CloudBase(ABC): :type args: IntegrationConfig """ self.args = args - self.platform = self.__module__.split('.')[2] + self.platform = self.__module__.split('.')[-1] def config_callback(files): # type: (t.List[t.Tuple[str, str]]) -> None """Add the config file to the payload file list.""" diff --git a/test/runner/lib/cloud/acme.py b/test/lib/ansible_test/_internal/cloud/acme.py similarity index 98% rename from test/runner/lib/cloud/acme.py rename to test/lib/ansible_test/_internal/cloud/acme.py index 0d200faa27b..770dc307da7 100644 --- a/test/runner/lib/cloud/acme.py +++ b/test/lib/ansible_test/_internal/cloud/acme.py @@ -5,24 +5,24 @@ __metaclass__ = type import os import time -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ( +from ..util import ( find_executable, display, ApplicationError, SubprocessError, ) -from lib.http import ( +from ..http import ( HttpClient, ) -from lib.docker_util import ( +from ..docker_util import ( docker_run, docker_rm, docker_inspect, diff --git a/test/runner/lib/cloud/aws.py b/test/lib/ansible_test/_internal/cloud/aws.py similarity index 98% rename from test/runner/lib/cloud/aws.py rename to test/lib/ansible_test/_internal/cloud/aws.py index 948415bd90f..e2032d5dae7 100644 --- a/test/runner/lib/cloud/aws.py +++ b/test/lib/ansible_test/_internal/cloud/aws.py @@ -4,20 +4,20 @@ __metaclass__ = type import os -from lib.util import ( +from ..util import ( ApplicationError, display, is_shippable, ConfigParser, ) -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.core_ci import ( +from ..core_ci import ( AnsibleCoreCI, ) diff --git a/test/runner/lib/cloud/azure.py b/test/lib/ansible_test/_internal/cloud/azure.py similarity index 98% rename from test/runner/lib/cloud/azure.py rename to test/lib/ansible_test/_internal/cloud/azure.py index b1930097e26..e022a83e3d5 100644 --- a/test/runner/lib/cloud/azure.py +++ b/test/lib/ansible_test/_internal/cloud/azure.py @@ -4,27 +4,27 @@ __metaclass__ = type import os -from lib.util import ( +from ..util import ( ApplicationError, display, is_shippable, ConfigParser, ) -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.http import ( +from ..http import ( HttpClient, urlparse, urlunparse, parse_qs, ) -from lib.core_ci import ( +from ..core_ci import ( AnsibleCoreCI, ) diff --git a/test/runner/lib/cloud/cloudscale.py b/test/lib/ansible_test/_internal/cloud/cloudscale.py similarity index 97% rename from test/runner/lib/cloud/cloudscale.py rename to test/lib/ansible_test/_internal/cloud/cloudscale.py index 60b3c9d3f44..098bdb7c8c4 100644 --- a/test/runner/lib/cloud/cloudscale.py +++ b/test/lib/ansible_test/_internal/cloud/cloudscale.py @@ -9,13 +9,13 @@ __metaclass__ = type from os.path import isfile -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ConfigParser, display +from ..util import ConfigParser, display class CloudscaleCloudProvider(CloudProvider): diff --git a/test/runner/lib/cloud/cs.py b/test/lib/ansible_test/_internal/cloud/cs.py similarity index 98% rename from test/runner/lib/cloud/cs.py rename to test/lib/ansible_test/_internal/cloud/cs.py index a5cbe5d8f36..0bf5f51569c 100644 --- a/test/runner/lib/cloud/cs.py +++ b/test/lib/ansible_test/_internal/cloud/cs.py @@ -7,13 +7,13 @@ import os import re import time -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ( +from ..util import ( find_executable, ApplicationError, display, @@ -22,13 +22,13 @@ from lib.util import ( ConfigParser, ) -from lib.http import ( +from ..http import ( HttpClient, HttpError, urlparse, ) -from lib.docker_util import ( +from ..docker_util import ( docker_run, docker_rm, docker_inspect, diff --git a/test/runner/lib/cloud/foreman.py b/test/lib/ansible_test/_internal/cloud/foreman.py similarity index 100% rename from test/runner/lib/cloud/foreman.py rename to test/lib/ansible_test/_internal/cloud/foreman.py diff --git a/test/runner/lib/cloud/gcp.py b/test/lib/ansible_test/_internal/cloud/gcp.py similarity index 97% rename from test/runner/lib/cloud/gcp.py rename to test/lib/ansible_test/_internal/cloud/gcp.py index 9b56e54e227..c8de18357cd 100644 --- a/test/runner/lib/cloud/gcp.py +++ b/test/lib/ansible_test/_internal/cloud/gcp.py @@ -6,12 +6,12 @@ __metaclass__ = type import os -from lib.util import ( +from ..util import ( display, ConfigParser, ) -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, diff --git a/test/runner/lib/cloud/hcloud.py b/test/lib/ansible_test/_internal/cloud/hcloud.py similarity index 97% rename from test/runner/lib/cloud/hcloud.py rename to test/lib/ansible_test/_internal/cloud/hcloud.py index 29a437b7cee..fa068597b06 100644 --- a/test/runner/lib/cloud/hcloud.py +++ b/test/lib/ansible_test/_internal/cloud/hcloud.py @@ -4,19 +4,19 @@ __metaclass__ = type import os -from lib.util import ( +from ..util import ( display, is_shippable, ConfigParser, ) -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.core_ci import ( +from ..core_ci import ( AnsibleCoreCI, ) diff --git a/test/runner/lib/cloud/nios.py b/test/lib/ansible_test/_internal/cloud/nios.py similarity index 100% rename from test/runner/lib/cloud/nios.py rename to test/lib/ansible_test/_internal/cloud/nios.py diff --git a/test/runner/lib/cloud/opennebula.py b/test/lib/ansible_test/_internal/cloud/opennebula.py similarity index 97% rename from test/runner/lib/cloud/opennebula.py rename to test/lib/ansible_test/_internal/cloud/opennebula.py index 0ffaac5d0dd..d0757279d02 100644 --- a/test/runner/lib/cloud/opennebula.py +++ b/test/lib/ansible_test/_internal/cloud/opennebula.py @@ -2,13 +2,13 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ( +from ..util import ( display, ConfigParser, ) diff --git a/test/runner/lib/cloud/openshift.py b/test/lib/ansible_test/_internal/cloud/openshift.py similarity index 98% rename from test/runner/lib/cloud/openshift.py rename to test/lib/ansible_test/_internal/cloud/openshift.py index eedc764c177..15d90cd1ad9 100644 --- a/test/runner/lib/cloud/openshift.py +++ b/test/lib/ansible_test/_internal/cloud/openshift.py @@ -7,24 +7,24 @@ import os import re import time -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ( +from ..util import ( find_executable, ApplicationError, display, SubprocessError, ) -from lib.http import ( +from ..http import ( HttpClient, ) -from lib.docker_util import ( +from ..docker_util import ( docker_exec, docker_run, docker_rm, diff --git a/test/runner/lib/cloud/scaleway.py b/test/lib/ansible_test/_internal/cloud/scaleway.py similarity index 96% rename from test/runner/lib/cloud/scaleway.py rename to test/lib/ansible_test/_internal/cloud/scaleway.py index 3dcba47dfec..f52f8f0e452 100644 --- a/test/runner/lib/cloud/scaleway.py +++ b/test/lib/ansible_test/_internal/cloud/scaleway.py @@ -4,13 +4,13 @@ __metaclass__ = type import os -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ConfigParser +from ..util import ConfigParser class ScalewayCloudProvider(CloudProvider): diff --git a/test/runner/lib/cloud/tower.py b/test/lib/ansible_test/_internal/cloud/tower.py similarity index 98% rename from test/runner/lib/cloud/tower.py rename to test/lib/ansible_test/_internal/cloud/tower.py index 2c34a065382..a0f98612fa4 100644 --- a/test/runner/lib/cloud/tower.py +++ b/test/lib/ansible_test/_internal/cloud/tower.py @@ -5,7 +5,7 @@ __metaclass__ = type import os import time -from lib.util import ( +from ..util import ( display, ApplicationError, is_shippable, @@ -13,17 +13,17 @@ from lib.util import ( ConfigParser, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.core_ci import ( +from ..core_ci import ( AnsibleCoreCI, ) diff --git a/test/runner/lib/cloud/vcenter.py b/test/lib/ansible_test/_internal/cloud/vcenter.py similarity index 98% rename from test/runner/lib/cloud/vcenter.py rename to test/lib/ansible_test/_internal/cloud/vcenter.py index c12368d047c..40947b9a058 100644 --- a/test/runner/lib/cloud/vcenter.py +++ b/test/lib/ansible_test/_internal/cloud/vcenter.py @@ -5,13 +5,13 @@ __metaclass__ = type import os import time -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ( +from ..util import ( find_executable, display, ApplicationError, @@ -20,7 +20,7 @@ from lib.util import ( SubprocessError, ) -from lib.docker_util import ( +from ..docker_util import ( docker_run, docker_rm, docker_inspect, @@ -28,11 +28,11 @@ from lib.docker_util import ( get_docker_container_id, ) -from lib.core_ci import ( +from ..core_ci import ( AnsibleCoreCI, ) -from lib.http import ( +from ..http import ( HttpClient, ) diff --git a/test/runner/lib/cloud/vultr.py b/test/lib/ansible_test/_internal/cloud/vultr.py similarity index 96% rename from test/runner/lib/cloud/vultr.py rename to test/lib/ansible_test/_internal/cloud/vultr.py index a47a60431a2..3ff2b98cec8 100644 --- a/test/runner/lib/cloud/vultr.py +++ b/test/lib/ansible_test/_internal/cloud/vultr.py @@ -4,13 +4,13 @@ __metaclass__ = type import os -from lib.cloud import ( +from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) -from lib.util import ConfigParser +from ..util import ConfigParser class VultrCloudProvider(CloudProvider): diff --git a/test/runner/lib/config.py b/test/lib/ansible_test/_internal/config.py similarity index 98% rename from test/runner/lib/config.py rename to test/lib/ansible_test/_internal/config.py index 7d22e51e674..5d1dfa254f7 100644 --- a/test/runner/lib/config.py +++ b/test/lib/ansible_test/_internal/config.py @@ -5,9 +5,9 @@ __metaclass__ = type import os import sys -import lib.types as t +from . import types as t -from lib.util import ( +from .util import ( is_shippable, docker_qualify_image, find_python, @@ -16,15 +16,15 @@ from lib.util import ( ApplicationError, ) -from lib.util_common import ( +from .util_common import ( CommonConfig, ) -from lib.metadata import ( +from .metadata import ( Metadata, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/constants.py b/test/lib/ansible_test/_internal/constants.py similarity index 100% rename from test/runner/lib/constants.py rename to test/lib/ansible_test/_internal/constants.py diff --git a/test/runner/lib/core_ci.py b/test/lib/ansible_test/_internal/core_ci.py similarity index 99% rename from test/runner/lib/core_ci.py rename to test/lib/ansible_test/_internal/core_ci.py index 46270ad0abb..47178e61025 100644 --- a/test/runner/lib/core_ci.py +++ b/test/lib/ansible_test/_internal/core_ci.py @@ -9,15 +9,15 @@ import uuid import errno import time -import lib.types as t +from . import types as t -from lib.http import ( +from .http import ( HttpClient, HttpResponse, HttpError, ) -from lib.util import ( +from .util import ( ApplicationError, make_dirs, display, @@ -25,15 +25,15 @@ from lib.util import ( to_text, ) -from lib.util_common import ( +from .util_common import ( run_command, ) -from lib.config import ( +from .config import ( EnvironmentConfig, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/cover.py b/test/lib/ansible_test/_internal/cover.py similarity index 98% rename from test/runner/lib/cover.py rename to test/lib/ansible_test/_internal/cover.py index af04ac52323..a768a9d93b2 100644 --- a/test/runner/lib/cover.py +++ b/test/lib/ansible_test/_internal/cover.py @@ -5,32 +5,32 @@ __metaclass__ = type import os import re -from lib.target import ( +from .target import ( walk_module_targets, walk_compile_targets, ) -from lib.util import ( +from .util import ( display, ApplicationError, common_environment, ) -from lib.util_common import ( +from .util_common import ( run_command, ) -from lib.config import ( +from .config import ( CoverageConfig, CoverageReportConfig, ) -from lib.executor import ( +from .executor import ( Delegate, install_command_requirements, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/coverage_util.py b/test/lib/ansible_test/_internal/coverage_util.py similarity index 97% rename from test/runner/lib/coverage_util.py rename to test/lib/ansible_test/_internal/coverage_util.py index c106665c824..d44bf5bafb8 100644 --- a/test/runner/lib/coverage_util.py +++ b/test/lib/ansible_test/_internal/coverage_util.py @@ -6,18 +6,18 @@ import contextlib import os import tempfile -from lib.config import ( +from .config import ( IntegrationConfig, SanityConfig, TestConfig, ) -from lib.util import ( +from .util import ( COVERAGE_CONFIG_PATH, remove_tree, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/csharp_import_analysis.py b/test/lib/ansible_test/_internal/csharp_import_analysis.py similarity index 98% rename from test/runner/lib/csharp_import_analysis.py rename to test/lib/ansible_test/_internal/csharp_import_analysis.py index b23ae660967..185a72dcb56 100644 --- a/test/runner/lib/csharp_import_analysis.py +++ b/test/lib/ansible_test/_internal/csharp_import_analysis.py @@ -5,11 +5,11 @@ __metaclass__ = type import os import re -from lib.util import ( +from .util import ( display, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/data.py b/test/lib/ansible_test/_internal/data.py similarity index 96% rename from test/runner/lib/data.py rename to test/lib/ansible_test/_internal/data.py index fd004c74976..a99b573abc1 100644 --- a/test/runner/lib/data.py +++ b/test/lib/ansible_test/_internal/data.py @@ -4,30 +4,30 @@ __metaclass__ = type import os -import lib.types as t +from . import types as t -from lib.util import ( +from .util import ( ApplicationError, import_plugins, ANSIBLE_ROOT, is_subdir, ) -from lib.provider import ( +from .provider import ( find_path_provider, get_path_provider_classes, ProviderNotFoundForPath, ) -from lib.provider.source import ( +from .provider.source import ( SourceProvider, ) -from lib.provider.source.unversioned import ( +from .provider.source.unversioned import ( UnversionedSource, ) -from lib.provider.layout import ( +from .provider.layout import ( ContentLayout, InstallLayout, LayoutProvider, diff --git a/test/runner/lib/delegation.py b/test/lib/ansible_test/_internal/delegation.py similarity index 98% rename from test/runner/lib/delegation.py rename to test/lib/ansible_test/_internal/delegation.py index baeb4585a05..35e09fa73aa 100644 --- a/test/runner/lib/delegation.py +++ b/test/lib/ansible_test/_internal/delegation.py @@ -7,7 +7,7 @@ import re import sys import tempfile -from lib.executor import ( +from .executor import ( SUPPORTED_PYTHON_VERSIONS, HTTPTESTER_HOSTS, create_shell_command, @@ -19,7 +19,7 @@ from lib.executor import ( get_remote_completion, ) -from lib.config import ( +from .config import ( TestConfig, EnvironmentConfig, IntegrationConfig, @@ -28,16 +28,16 @@ from lib.config import ( UnitsConfig, ) -from lib.core_ci import ( +from .core_ci import ( AnsibleCoreCI, ) -from lib.manage_ci import ( +from .manage_ci import ( ManagePosixCI, ManageWindowsCI, ) -from lib.util import ( +from .util import ( ApplicationError, common_environment, pass_vars, @@ -46,11 +46,11 @@ from lib.util import ( ANSIBLE_TEST_DATA_ROOT, ) -from lib.util_common import ( +from .util_common import ( run_command, ) -from lib.docker_util import ( +from .docker_util import ( docker_exec, docker_get, docker_pull, @@ -62,19 +62,19 @@ from lib.docker_util import ( get_docker_networks, ) -from lib.cloud import ( +from .cloud import ( get_cloud_providers, ) -from lib.target import ( +from .target import ( IntegrationTarget, ) -from lib.data import ( +from .data import ( data_context, ) -from lib.payload import ( +from .payload import ( create_payload, ) diff --git a/test/runner/lib/diff.py b/test/lib/ansible_test/_internal/diff.py similarity index 99% rename from test/runner/lib/diff.py rename to test/lib/ansible_test/_internal/diff.py index f0cb93d4fd6..1e2038b98be 100644 --- a/test/runner/lib/diff.py +++ b/test/lib/ansible_test/_internal/diff.py @@ -6,9 +6,9 @@ import re import textwrap import traceback -import lib.types as t +from . import types as t -from lib.util import ( +from .util import ( ApplicationError, ) diff --git a/test/runner/lib/docker_util.py b/test/lib/ansible_test/_internal/docker_util.py similarity index 99% rename from test/runner/lib/docker_util.py rename to test/lib/ansible_test/_internal/docker_util.py index d8332ef7bd9..ebee766f3a6 100644 --- a/test/runner/lib/docker_util.py +++ b/test/lib/ansible_test/_internal/docker_util.py @@ -6,7 +6,7 @@ import json import os import time -from lib.util import ( +from .util import ( ApplicationError, common_environment, display, @@ -14,11 +14,11 @@ from lib.util import ( SubprocessError, ) -from lib.util_common import ( +from .util_common import ( run_command, ) -from lib.config import ( +from .config import ( EnvironmentConfig, ) diff --git a/test/runner/lib/env.py b/test/lib/ansible_test/_internal/env.py similarity index 97% rename from test/runner/lib/env.py rename to test/lib/ansible_test/_internal/env.py index 97d6bb225ce..2a2e0aa880d 100644 --- a/test/runner/lib/env.py +++ b/test/lib/ansible_test/_internal/env.py @@ -12,12 +12,12 @@ import signal import sys import time -from lib.config import ( +from .config import ( CommonConfig, TestConfig, ) -from lib.util import ( +from .util import ( display, find_executable, raw_command, @@ -25,28 +25,28 @@ from lib.util import ( ApplicationError, ) -from lib.ansible_util import ( +from .ansible_util import ( ansible_environment, ) -from lib.git import ( +from .git import ( Git, ) -from lib.docker_util import ( +from .docker_util import ( docker_info, docker_version ) -from lib.thread import ( +from .thread import ( WrappedThread, ) -from lib.constants import ( +from .constants import ( TIMEOUT_PATH, ) -from lib.test import ( +from .test import ( TestTimeout, ) diff --git a/test/runner/lib/executor.py b/test/lib/ansible_test/_internal/executor.py similarity index 99% rename from test/runner/lib/executor.py rename to test/lib/ansible_test/_internal/executor.py index c00cf9e57e9..a93766309e9 100644 --- a/test/runner/lib/executor.py +++ b/test/lib/ansible_test/_internal/executor.py @@ -18,23 +18,23 @@ import random import string import shutil -import lib.types as t +from . import types as t -from lib.thread import ( +from .thread import ( WrappedThread, ) -from lib.core_ci import ( +from .core_ci import ( AnsibleCoreCI, SshKey, ) -from lib.manage_ci import ( +from .manage_ci import ( ManageWindowsCI, ManageNetworkCI, ) -from lib.cloud import ( +from .cloud import ( cloud_filter, cloud_init, get_cloud_environment, @@ -42,7 +42,7 @@ from lib.cloud import ( CloudEnvironmentConfig, ) -from lib.util import ( +from .util import ( ApplicationWarning, ApplicationError, SubprocessError, @@ -66,14 +66,14 @@ from lib.util import ( is_subdir, ) -from lib.util_common import ( +from .util_common import ( get_python_path, intercept_command, named_temporary_file, run_command, ) -from lib.docker_util import ( +from .docker_util import ( docker_pull, docker_run, docker_available, @@ -82,12 +82,12 @@ from lib.docker_util import ( get_docker_container_ip, ) -from lib.ansible_util import ( +from .ansible_util import ( ansible_environment, check_pyyaml, ) -from lib.target import ( +from .target import ( IntegrationTarget, walk_internal_targets, walk_posix_integration_targets, @@ -96,20 +96,20 @@ from lib.target import ( walk_units_targets, ) -from lib.changes import ( +from .changes import ( ShippableChanges, LocalChanges, ) -from lib.git import ( +from .git import ( Git, ) -from lib.classification import ( +from .classification import ( categorize_changes, ) -from lib.config import ( +from .config import ( TestConfig, EnvironmentConfig, IntegrationConfig, @@ -120,21 +120,21 @@ from lib.config import ( WindowsIntegrationConfig, ) -from lib.metadata import ( +from .metadata import ( ChangeDescription, ) -from lib.integration import ( +from .integration import ( integration_test_environment, integration_test_config_file, setup_common_temp_dir, ) -from lib.coverage_util import ( +from .coverage_util import ( coverage_context, ) -from lib.data import ( +from .data import ( data_context, ) @@ -1386,7 +1386,7 @@ def command_units(args): plugins.append('ansible_pytest_collections') if plugins: - env['PYTHONPATH'] += ':%s' % os.path.join(ANSIBLE_ROOT, 'test/units/pytest/plugins') + env['PYTHONPATH'] += ':%s' % os.path.join(ANSIBLE_TEST_DATA_ROOT, 'pytest/plugins') for plugin in plugins: cmd.extend(['-p', plugin]) diff --git a/test/runner/lib/git.py b/test/lib/ansible_test/_internal/git.py similarity index 98% rename from test/runner/lib/git.py rename to test/lib/ansible_test/_internal/git.py index f6d0eccfa34..28d946ade43 100644 --- a/test/runner/lib/git.py +++ b/test/lib/ansible_test/_internal/git.py @@ -2,9 +2,9 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import lib.types as t +from . import types as t -from lib.util import ( +from .util import ( SubprocessError, raw_command, ) diff --git a/test/runner/lib/http.py b/test/lib/ansible_test/_internal/http.py similarity index 98% rename from test/runner/lib/http.py rename to test/lib/ansible_test/_internal/http.py index 18a429c51fd..6607a10bc04 100644 --- a/test/runner/lib/http.py +++ b/test/lib/ansible_test/_internal/http.py @@ -21,13 +21,13 @@ except ImportError: # noinspection PyCompatibility, PyUnresolvedReferences from urllib.parse import urlparse, urlunparse, parse_qs # pylint: disable=locally-disabled, ungrouped-imports -from lib.util import ( +from .util import ( ApplicationError, SubprocessError, display, ) -from lib.util_common import ( +from .util_common import ( CommonConfig, run_command, ) diff --git a/test/runner/lib/import_analysis.py b/test/lib/ansible_test/_internal/import_analysis.py similarity index 99% rename from test/runner/lib/import_analysis.py rename to test/lib/ansible_test/_internal/import_analysis.py index ed1f1818722..a1f58eb4f5c 100644 --- a/test/runner/lib/import_analysis.py +++ b/test/lib/ansible_test/_internal/import_analysis.py @@ -5,12 +5,12 @@ __metaclass__ = type import ast import os -from lib.util import ( +from .util import ( display, ApplicationError, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/init.py b/test/lib/ansible_test/_internal/init.py similarity index 95% rename from test/runner/lib/init.py rename to test/lib/ansible_test/_internal/init.py index 5ce29a7e396..682e6b0cf1c 100644 --- a/test/runner/lib/init.py +++ b/test/lib/ansible_test/_internal/init.py @@ -4,7 +4,7 @@ __metaclass__ = type import resource -from lib.constants import ( +from .constants import ( SOFT_RLIMIT_NOFILE, ) diff --git a/test/runner/lib/integration/__init__.py b/test/lib/ansible_test/_internal/integration/__init__.py similarity index 97% rename from test/runner/lib/integration/__init__.py rename to test/lib/ansible_test/_internal/integration/__init__.py index 0d13777ee73..30531209a0a 100644 --- a/test/runner/lib/integration/__init__.py +++ b/test/lib/ansible_test/_internal/integration/__init__.py @@ -8,18 +8,18 @@ import os import shutil import tempfile -from lib.target import ( +from ..target import ( analyze_integration_target_dependencies, walk_integration_targets, ) -from lib.config import ( +from ..config import ( NetworkIntegrationConfig, PosixIntegrationConfig, WindowsIntegrationConfig, ) -from lib.util import ( +from ..util import ( ApplicationError, display, make_dirs, @@ -32,23 +32,23 @@ from lib.util import ( to_bytes, ) -from lib.util_common import ( +from ..util_common import ( named_temporary_file, ) -from lib.coverage_util import ( +from ..coverage_util import ( generate_collection_coverage_config, ) -from lib.cache import ( +from ..cache import ( CommonCache, ) -from lib.cloud import ( +from ..cloud import ( CloudEnvironmentConfig, ) -from lib.data import ( +from ..data import ( data_context, ) diff --git a/test/runner/lib/manage_ci.py b/test/lib/ansible_test/_internal/manage_ci.py similarity index 98% rename from test/runner/lib/manage_ci.py rename to test/lib/ansible_test/_internal/manage_ci.py index 732d554ac53..3b13c36f360 100644 --- a/test/runner/lib/manage_ci.py +++ b/test/lib/ansible_test/_internal/manage_ci.py @@ -6,7 +6,7 @@ import os import tempfile import time -from lib.util import ( +from .util import ( SubprocessError, ApplicationError, cmd_quote, @@ -14,24 +14,24 @@ from lib.util import ( ANSIBLE_TEST_DATA_ROOT, ) -from lib.util_common import ( +from .util_common import ( intercept_command, run_command, ) -from lib.core_ci import ( +from .core_ci import ( AnsibleCoreCI, ) -from lib.ansible_util import ( +from .ansible_util import ( ansible_environment, ) -from lib.config import ( +from .config import ( ShellConfig, ) -from lib.payload import ( +from .payload import ( create_payload, ) diff --git a/test/runner/lib/metadata.py b/test/lib/ansible_test/_internal/metadata.py similarity index 98% rename from test/runner/lib/metadata.py rename to test/lib/ansible_test/_internal/metadata.py index 4fbcb17e9cd..4abd239b8ee 100644 --- a/test/runner/lib/metadata.py +++ b/test/lib/ansible_test/_internal/metadata.py @@ -4,14 +4,14 @@ __metaclass__ = type import json -import lib.types as t +from . import types as t -from lib.util import ( +from .util import ( display, is_shippable, ) -from lib.diff import ( +from .diff import ( parse_diff, FileDiff, ) diff --git a/test/runner/lib/payload.py b/test/lib/ansible_test/_internal/payload.py similarity index 89% rename from test/runner/lib/payload.py rename to test/lib/ansible_test/_internal/payload.py index cd09ab39a84..12127e75d05 100644 --- a/test/runner/lib/payload.py +++ b/test/lib/ansible_test/_internal/payload.py @@ -6,21 +6,21 @@ import os import tarfile import time -from lib.config import ( +from .config import ( IntegrationConfig, ShellConfig, ) -from lib.util import ( +from .util import ( display, ANSIBLE_ROOT, ) -from lib.data import ( +from .data import ( data_context, ) -from lib.util_common import ( +from .util_common import ( CommonConfig, ) @@ -40,10 +40,8 @@ def create_payload(args, dst_path): # type: (CommonConfig, str) -> None files = [f for f in files if f[1].startswith('bin/') or f[1].startswith('lib/') or - f[1].startswith('test/runner/') or + f[1].startswith('test/lib/') or f[1].startswith('packaging/requirements/') or - f[1].startswith('test/sanity/') or # sanity only - f[1].startswith('test/units/pytest/plugins/') or # units only f[1] in ( 'setup.py', 'README.rst', diff --git a/test/runner/lib/powershell_import_analysis.py b/test/lib/ansible_test/_internal/powershell_import_analysis.py similarity index 98% rename from test/runner/lib/powershell_import_analysis.py rename to test/lib/ansible_test/_internal/powershell_import_analysis.py index 61e031774fc..4d16249064f 100644 --- a/test/runner/lib/powershell_import_analysis.py +++ b/test/lib/ansible_test/_internal/powershell_import_analysis.py @@ -5,11 +5,11 @@ __metaclass__ = type import os import re -from lib.util import ( +from .util import ( display, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/provider/__init__.py b/test/lib/ansible_test/_internal/provider/__init__.py similarity index 97% rename from test/runner/lib/provider/__init__.py rename to test/lib/ansible_test/_internal/provider/__init__.py index 0a080902266..f5ab0dd44eb 100644 --- a/test/runner/lib/provider/__init__.py +++ b/test/lib/ansible_test/_internal/provider/__init__.py @@ -5,9 +5,9 @@ __metaclass__ = type import abc import os -import lib.types as t +from .. import types as t -from lib.util import ( +from ..util import ( ABC, ApplicationError, get_subclasses, diff --git a/test/runner/lib/provider/layout/__init__.py b/test/lib/ansible_test/_internal/provider/layout/__init__.py similarity index 99% rename from test/runner/lib/provider/layout/__init__.py rename to test/lib/ansible_test/_internal/provider/layout/__init__.py index 1a568743053..87f85ccc48d 100644 --- a/test/runner/lib/provider/layout/__init__.py +++ b/test/lib/ansible_test/_internal/provider/layout/__init__.py @@ -6,9 +6,9 @@ import abc import collections import os -import lib.types as t +from ... import types as t -from lib.util import ( +from ...util import ( ANSIBLE_ROOT, ) diff --git a/test/runner/lib/provider/layout/ansible.py b/test/lib/ansible_test/_internal/provider/layout/ansible.py similarity index 83% rename from test/runner/lib/provider/layout/ansible.py rename to test/lib/ansible_test/_internal/provider/layout/ansible.py index 8ff4a3d1f8c..bbf076bdfe6 100644 --- a/test/runner/lib/provider/layout/ansible.py +++ b/test/lib/ansible_test/_internal/provider/layout/ansible.py @@ -5,7 +5,11 @@ __metaclass__ = type import os import re -import lib.types as t +from ... import types as t + +from ...util import ( + ANSIBLE_TEST_ROOT, +) from . import ( ContentLayout, @@ -23,10 +27,10 @@ class AnsibleLayout(LayoutProvider): def create(self, root, paths): # type: (str, t.List[str]) -> ContentLayout """Create a Layout using the given root and paths.""" plugin_types = sorted(set(p.split('/')[3] for p in paths if re.search(r'^lib/ansible/plugins/[^/]+/', p))) - provider_types = sorted(set(p.split('/')[4] for p in paths if re.search(r'^test/runner/lib/provider/[^/]+/', p))) + provider_types = sorted(set(p.split('/')[5] for p in paths if re.search(r'^test/lib/ansible_test/_internal/provider/[^/]+/', p))) plugin_paths = dict((p, os.path.join('lib/ansible/plugins', p)) for p in plugin_types) - provider_paths = dict((p, os.path.join('test/runner/lib/provider', p)) for p in provider_types) + provider_paths = dict((p, os.path.join(ANSIBLE_TEST_ROOT, '_internal/provider', p)) for p in provider_types) plugin_paths.update(dict( modules='lib/ansible/modules', diff --git a/test/runner/lib/provider/layout/collection.py b/test/lib/ansible_test/_internal/provider/layout/collection.py similarity index 98% rename from test/runner/lib/provider/layout/collection.py rename to test/lib/ansible_test/_internal/provider/layout/collection.py index fb0aa16e4a4..2c778c07c0b 100644 --- a/test/runner/lib/provider/layout/collection.py +++ b/test/lib/ansible_test/_internal/provider/layout/collection.py @@ -5,7 +5,7 @@ __metaclass__ = type import os import re -import lib.types as t +from ... import types as t from . import ( ContentLayout, diff --git a/test/runner/lib/provider/source/__init__.py b/test/lib/ansible_test/_internal/provider/source/__init__.py similarity index 94% rename from test/runner/lib/provider/source/__init__.py rename to test/lib/ansible_test/_internal/provider/source/__init__.py index 29ebb9dad42..fab28b09036 100644 --- a/test/runner/lib/provider/source/__init__.py +++ b/test/lib/ansible_test/_internal/provider/source/__init__.py @@ -4,7 +4,7 @@ __metaclass__ = type import abc -import lib.types as t +from ... import types as t from .. import ( PathProvider, diff --git a/test/runner/lib/provider/source/git.py b/test/lib/ansible_test/_internal/provider/source/git.py similarity index 95% rename from test/runner/lib/provider/source/git.py rename to test/lib/ansible_test/_internal/provider/source/git.py index be5175af008..5b530b641fd 100644 --- a/test/runner/lib/provider/source/git.py +++ b/test/lib/ansible_test/_internal/provider/source/git.py @@ -4,9 +4,9 @@ __metaclass__ = type import os -import lib.types as t +from ... import types as t -from lib.git import ( +from ...git import ( Git, ) diff --git a/test/runner/lib/provider/source/unversioned.py b/test/lib/ansible_test/_internal/provider/source/unversioned.py similarity index 97% rename from test/runner/lib/provider/source/unversioned.py rename to test/lib/ansible_test/_internal/provider/source/unversioned.py index dabd243cf09..2975af627ee 100644 --- a/test/runner/lib/provider/source/unversioned.py +++ b/test/lib/ansible_test/_internal/provider/source/unversioned.py @@ -4,9 +4,9 @@ __metaclass__ = type import os -import lib.types as t +from ... import types as t -from lib.constants import ( +from ...constants import ( TIMEOUT_PATH, ) diff --git a/test/runner/lib/sanity/__init__.py b/test/lib/ansible_test/_internal/sanity/__init__.py similarity index 99% rename from test/runner/lib/sanity/__init__.py rename to test/lib/ansible_test/_internal/sanity/__init__.py index e8f6120c805..310208e969b 100644 --- a/test/runner/lib/sanity/__init__.py +++ b/test/lib/ansible_test/_internal/sanity/__init__.py @@ -9,9 +9,9 @@ import os import re import collections -import lib.types as t +from .. import types as t -from lib.util import ( +from ..util import ( ApplicationError, SubprocessError, display, @@ -19,7 +19,7 @@ from lib.util import ( load_plugins, parse_to_list_of_dict, ABC, - ANSIBLE_ROOT, + ANSIBLE_TEST_DATA_ROOT, is_binary_file, read_lines_without_comments, get_available_python_versions, @@ -28,22 +28,22 @@ from lib.util import ( paths_to_dirs, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.ansible_util import ( +from ..ansible_util import ( ansible_environment, check_pyyaml, ) -from lib.target import ( +from ..target import ( walk_internal_targets, walk_sanity_targets, TestTarget, ) -from lib.executor import ( +from ..executor import ( get_changes_filter, AllTargetsSkipped, Delegate, @@ -51,11 +51,11 @@ from lib.executor import ( SUPPORTED_PYTHON_VERSIONS, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.test import ( +from ..test import ( TestSuccess, TestFailure, TestSkipped, @@ -63,16 +63,16 @@ from lib.test import ( calculate_best_confidence, ) -from lib.data import ( +from ..data import ( data_context, ) -from lib.env import ( +from ..env import ( get_ansible_version, ) COMMAND = 'sanity' -SANITY_ROOT = os.path.join(ANSIBLE_ROOT, 'test', 'sanity') +SANITY_ROOT = os.path.join(ANSIBLE_TEST_DATA_ROOT, 'sanity') def command_sanity(args): diff --git a/test/runner/lib/sanity/ansible_doc.py b/test/lib/ansible_test/_internal/sanity/ansible_doc.py similarity index 95% rename from test/runner/lib/sanity/ansible_doc.py rename to test/lib/ansible_test/_internal/sanity/ansible_doc.py index 805215136c0..27bdfff48cb 100644 --- a/test/runner/lib/sanity/ansible_doc.py +++ b/test/lib/ansible_test/_internal/sanity/ansible_doc.py @@ -6,42 +6,42 @@ import collections import os import re -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanitySingleVersion, SanityFailure, SanitySuccess, SanityMessage, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, display, is_subdir, ) -from lib.util_common import ( +from ..util_common import ( intercept_command, ) -from lib.ansible_util import ( +from ..ansible_util import ( ansible_environment, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.data import ( +from ..data import ( data_context, ) -from lib.coverage_util import ( +from ..coverage_util import ( coverage_context, ) diff --git a/test/runner/lib/sanity/compile.py b/test/lib/ansible_test/_internal/sanity/compile.py similarity index 94% rename from test/runner/lib/sanity/compile.py rename to test/lib/ansible_test/_internal/sanity/compile.py index 6f6aa3961b7..5a517272fa0 100644 --- a/test/runner/lib/sanity/compile.py +++ b/test/lib/ansible_test/_internal/sanity/compile.py @@ -4,9 +4,9 @@ __metaclass__ = type import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanityMultipleVersion, SanityMessage, SanityFailure, @@ -15,11 +15,11 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, display, find_python, @@ -27,11 +27,11 @@ from lib.util import ( is_subdir, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.config import ( +from ..config import ( SanityConfig, ) diff --git a/test/runner/lib/sanity/ignores.py b/test/lib/ansible_test/_internal/sanity/ignores.py similarity index 97% rename from test/runner/lib/sanity/ignores.py rename to test/lib/ansible_test/_internal/sanity/ignores.py index 3cee330a688..8b6df50ce41 100644 --- a/test/runner/lib/sanity/ignores.py +++ b/test/lib/ansible_test/_internal/sanity/ignores.py @@ -4,7 +4,7 @@ __metaclass__ = type import os -from lib.sanity import ( +from ..sanity import ( SanityFailure, SanityIgnoreParser, SanityVersionNeutral, @@ -12,12 +12,12 @@ from lib.sanity import ( SanityMessage, ) -from lib.test import ( +from ..test import ( calculate_confidence, calculate_best_confidence, ) -from lib.config import ( +from ..config import ( SanityConfig, ) diff --git a/test/runner/lib/sanity/import.py b/test/lib/ansible_test/_internal/sanity/import.py similarity index 95% rename from test/runner/lib/sanity/import.py rename to test/lib/ansible_test/_internal/sanity/import.py index 15bedfb2cf1..921565e5495 100644 --- a/test/runner/lib/sanity/import.py +++ b/test/lib/ansible_test/_internal/sanity/import.py @@ -4,9 +4,9 @@ __metaclass__ = type import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanityMultipleVersion, SanityMessage, SanityFailure, @@ -14,11 +14,11 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, remove_tree, display, @@ -28,28 +28,28 @@ from lib.util import ( is_subdir, ) -from lib.util_common import ( +from ..util_common import ( intercept_command, run_command, ) -from lib.ansible_util import ( +from ..ansible_util import ( ansible_environment, ) -from lib.executor import ( +from ..executor import ( generate_pip_install, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.coverage_util import ( +from ..coverage_util import ( coverage_context, ) -from lib.data import ( +from ..data import ( data_context, ANSIBLE_ROOT, ) diff --git a/test/runner/lib/sanity/integration_aliases.py b/test/lib/ansible_test/_internal/sanity/integration_aliases.py similarity index 98% rename from test/runner/lib/sanity/integration_aliases.py rename to test/lib/ansible_test/_internal/sanity/integration_aliases.py index 81324318dad..e47b8bc5056 100644 --- a/test/runner/lib/sanity/integration_aliases.py +++ b/test/lib/ansible_test/_internal/sanity/integration_aliases.py @@ -7,9 +7,9 @@ import textwrap import re import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanityVersionNeutral, SanityMessage, SanityFailure, @@ -17,11 +17,11 @@ from lib.sanity import ( SanityTargets, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.target import ( +from ..target import ( filter_targets, walk_posix_integration_targets, walk_windows_integration_targets, @@ -29,11 +29,11 @@ from lib.target import ( walk_module_targets, ) -from lib.cloud import ( +from ..cloud import ( get_cloud_platforms, ) -from lib.util import ( +from ..util import ( display, ) diff --git a/test/runner/lib/sanity/pep8.py b/test/lib/ansible_test/_internal/sanity/pep8.py similarity index 95% rename from test/runner/lib/sanity/pep8.py rename to test/lib/ansible_test/_internal/sanity/pep8.py index 59e84671b75..9eb40dbce7d 100644 --- a/test/runner/lib/sanity/pep8.py +++ b/test/lib/ansible_test/_internal/sanity/pep8.py @@ -4,9 +4,9 @@ __metaclass__ = type import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, @@ -14,11 +14,11 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, read_lines_without_comments, parse_to_list_of_dict, @@ -26,11 +26,11 @@ from lib.util import ( is_subdir, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.config import ( +from ..config import ( SanityConfig, ) diff --git a/test/runner/lib/sanity/pslint.py b/test/lib/ansible_test/_internal/sanity/pslint.py similarity index 94% rename from test/runner/lib/sanity/pslint.py rename to test/lib/ansible_test/_internal/sanity/pslint.py index ac7a0b96a25..256eee0464d 100644 --- a/test/runner/lib/sanity/pslint.py +++ b/test/lib/ansible_test/_internal/sanity/pslint.py @@ -6,9 +6,9 @@ import json import os import re -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanityVersionNeutral, SanityMessage, SanityFailure, @@ -17,25 +17,25 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, find_executable, ANSIBLE_TEST_DATA_ROOT, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.data import ( +from ..data import ( data_context, ) diff --git a/test/runner/lib/sanity/pylint.py b/test/lib/ansible_test/_internal/sanity/pylint.py similarity index 96% rename from test/runner/lib/sanity/pylint.py rename to test/lib/ansible_test/_internal/sanity/pylint.py index 6d2db308a7a..e635ca1d20d 100644 --- a/test/runner/lib/sanity/pylint.py +++ b/test/lib/ansible_test/_internal/sanity/pylint.py @@ -7,9 +7,9 @@ import json import os import datetime -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, @@ -17,32 +17,31 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, display, ConfigParser, - ANSIBLE_ROOT, is_subdir, find_python, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.ansible_util import ( +from ..ansible_util import ( ansible_environment, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.data import ( +from ..data import ( data_context, ) @@ -126,9 +125,9 @@ 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/sanity/validate-modules/')) - add_context(remaining_paths, 'sanity', filter_path('test/sanity/')) - add_context(remaining_paths, 'ansible-test', filter_path('test/runner/')) + add_context(remaining_paths, 'validate-modules', filter_path('test/lib/ansible_test/_data/sanity/validate-modules/')) + add_context(remaining_paths, 'sanity', filter_path('test/lib/ansible_test/_data/sanity/')) + 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/')) add_context(remaining_paths, 'ansible', lambda p: True) diff --git a/test/runner/lib/sanity/rstcheck.py b/test/lib/ansible_test/_internal/sanity/rstcheck.py similarity index 94% rename from test/runner/lib/sanity/rstcheck.py rename to test/lib/ansible_test/_internal/sanity/rstcheck.py index e1f26c92b3c..2d8a01d544c 100644 --- a/test/runner/lib/sanity/rstcheck.py +++ b/test/lib/ansible_test/_internal/sanity/rstcheck.py @@ -4,9 +4,9 @@ __metaclass__ = type import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, @@ -14,22 +14,22 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, parse_to_list_of_dict, read_lines_without_comments, find_python, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.config import ( +from ..config import ( SanityConfig, ) diff --git a/test/runner/lib/sanity/sanity_docs.py b/test/lib/ansible_test/_internal/sanity/sanity_docs.py similarity index 95% rename from test/runner/lib/sanity/sanity_docs.py rename to test/lib/ansible_test/_internal/sanity/sanity_docs.py index 21e38582c7f..44638075ee2 100644 --- a/test/runner/lib/sanity/sanity_docs.py +++ b/test/lib/ansible_test/_internal/sanity/sanity_docs.py @@ -4,7 +4,7 @@ __metaclass__ = type import os -from lib.sanity import ( +from ..sanity import ( SanityVersionNeutral, SanityMessage, SanityFailure, @@ -12,11 +12,11 @@ from lib.sanity import ( sanity_get_tests, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.data import ( +from ..data import ( data_context, ) diff --git a/test/runner/lib/sanity/shellcheck.py b/test/lib/ansible_test/_internal/sanity/shellcheck.py similarity index 95% rename from test/runner/lib/sanity/shellcheck.py rename to test/lib/ansible_test/_internal/sanity/shellcheck.py index d6ec5e736ec..82689ced1e1 100644 --- a/test/runner/lib/sanity/shellcheck.py +++ b/test/lib/ansible_test/_internal/sanity/shellcheck.py @@ -9,9 +9,9 @@ from xml.etree.ElementTree import ( Element, ) -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanityVersionNeutral, SanityMessage, SanityFailure, @@ -20,21 +20,21 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, read_lines_without_comments, find_executable, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.config import ( +from ..config import ( SanityConfig, ) diff --git a/test/runner/lib/sanity/validate_modules.py b/test/lib/ansible_test/_internal/sanity/validate_modules.py similarity index 94% rename from test/runner/lib/sanity/validate_modules.py rename to test/lib/ansible_test/_internal/sanity/validate_modules.py index d33b345921b..ee18f4e4c53 100644 --- a/test/runner/lib/sanity/validate_modules.py +++ b/test/lib/ansible_test/_internal/sanity/validate_modules.py @@ -5,9 +5,9 @@ __metaclass__ = type import json import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, @@ -15,29 +15,29 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, display, find_python, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.ansible_util import ( +from ..ansible_util import ( ansible_environment, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.data import ( +from ..data import ( data_context, ) diff --git a/test/runner/lib/sanity/yamllint.py b/test/lib/ansible_test/_internal/sanity/yamllint.py similarity index 94% rename from test/runner/lib/sanity/yamllint.py rename to test/lib/ansible_test/_internal/sanity/yamllint.py index 5b67fe6ce07..2c86749e012 100644 --- a/test/runner/lib/sanity/yamllint.py +++ b/test/lib/ansible_test/_internal/sanity/yamllint.py @@ -5,9 +5,9 @@ __metaclass__ = type import json import os -import lib.types as t +from .. import types as t -from lib.sanity import ( +from ..sanity import ( SanitySingleVersion, SanityMessage, SanityFailure, @@ -15,26 +15,26 @@ from lib.sanity import ( SANITY_ROOT, ) -from lib.target import ( +from ..target import ( TestTarget, ) -from lib.util import ( +from ..util import ( SubprocessError, display, is_subdir, find_python, ) -from lib.util_common import ( +from ..util_common import ( run_command, ) -from lib.config import ( +from ..config import ( SanityConfig, ) -from lib.data import ( +from ..data import ( data_context, ) diff --git a/test/runner/lib/target.py b/test/lib/ansible_test/_internal/target.py similarity index 99% rename from test/runner/lib/target.py rename to test/lib/ansible_test/_internal/target.py index b8a3be85417..a152169a6e8 100644 --- a/test/runner/lib/target.py +++ b/test/lib/ansible_test/_internal/target.py @@ -9,7 +9,7 @@ import errno import itertools import abc -from lib.util import ( +from .util import ( ApplicationError, display, read_lines_without_comments, @@ -18,7 +18,7 @@ from lib.util import ( to_bytes, ) -from lib.data import ( +from .data import ( data_context, ) diff --git a/test/runner/lib/test.py b/test/lib/ansible_test/_internal/test.py similarity index 99% rename from test/runner/lib/test.py rename to test/lib/ansible_test/_internal/test.py index dd46dfca839..c33212fe14d 100644 --- a/test/runner/lib/test.py +++ b/test/lib/ansible_test/_internal/test.py @@ -6,15 +6,15 @@ import datetime import json import os -import lib.types as t +from . import types as t -from lib.util import ( +from .util import ( display, make_dirs, to_bytes, ) -from lib.config import ( +from .config import ( TestConfig, ) diff --git a/test/runner/lib/thread.py b/test/lib/ansible_test/_internal/thread.py similarity index 100% rename from test/runner/lib/thread.py rename to test/lib/ansible_test/_internal/thread.py diff --git a/test/runner/lib/types.py b/test/lib/ansible_test/_internal/types.py similarity index 100% rename from test/runner/lib/types.py rename to test/lib/ansible_test/_internal/types.py diff --git a/test/runner/lib/util.py b/test/lib/ansible_test/_internal/util.py similarity index 99% rename from test/runner/lib/util.py rename to test/lib/ansible_test/_internal/util.py index 500194ecfc9..da86c8ad404 100644 --- a/test/runner/lib/util.py +++ b/test/lib/ansible_test/_internal/util.py @@ -41,7 +41,7 @@ except ImportError: # noinspection PyProtectedMember from pipes import quote as cmd_quote -import lib.types as t +from . import types as t try: C = t.TypeVar('C') @@ -62,8 +62,9 @@ except AttributeError: COVERAGE_CONFIG_PATH = '.coveragerc' COVERAGE_OUTPUT_PATH = 'coverage' -ANSIBLE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) -ANSIBLE_TEST_DATA_ROOT = os.path.join(ANSIBLE_ROOT, 'test', 'runner') +ANSIBLE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))) +ANSIBLE_TEST_ROOT = os.path.join(ANSIBLE_ROOT, 'test', 'lib', 'ansible_test') +ANSIBLE_TEST_DATA_ROOT = os.path.join(ANSIBLE_TEST_ROOT, '_data') # Modes are set to allow all users the same level of access. # This permits files to be used in tests that change users. diff --git a/test/runner/lib/util_common.py b/test/lib/ansible_test/_internal/util_common.py similarity index 99% rename from test/runner/lib/util_common.py rename to test/lib/ansible_test/_internal/util_common.py index df498e4a9a0..1be296b8855 100644 --- a/test/runner/lib/util_common.py +++ b/test/lib/ansible_test/_internal/util_common.py @@ -9,7 +9,7 @@ import shutil import tempfile import textwrap -from lib.util import ( +from .util import ( common_environment, COVERAGE_CONFIG_PATH, COVERAGE_OUTPUT_PATH, diff --git a/test/lib/ansible_test/tests/Makefile b/test/lib/ansible_test/tests/Makefile new file mode 100644 index 00000000000..1e5afcd0a05 --- /dev/null +++ b/test/lib/ansible_test/tests/Makefile @@ -0,0 +1,9 @@ +all: sanity unit + +.PHONY: sanity +sanity: + ansible-test sanity test/lib/ ${FLAGS} + +.PHONY: unit +unit: + PYTHONPATH=../../lib/ pytest unit ${FLAGS} diff --git a/test/lib/ansible_test/tests/__init__.py b/test/lib/ansible_test/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/lib/ansible_test/tests/unit/__init__.py b/test/lib/ansible_test/tests/unit/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/runner/unit/test_diff.py b/test/lib/ansible_test/tests/unit/test_diff.py similarity index 97% rename from test/runner/unit/test_diff.py rename to test/lib/ansible_test/tests/unit/test_diff.py index f44537a60d1..93e7243b7a7 100644 --- a/test/runner/unit/test_diff.py +++ b/test/lib/ansible_test/tests/unit/test_diff.py @@ -6,12 +6,12 @@ import os import subprocess import pytest -from lib.util import ( +from ..._internal.util import ( to_text, to_bytes, ) -from lib.diff import ( +from ..._internal.diff import ( parse_diff, FileDiff, ) diff --git a/test/runner/Makefile b/test/runner/Makefile deleted file mode 100644 index baee64a9dd6..00000000000 --- a/test/runner/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: sanity unit - -.PHONY: sanity -sanity: - ansible-test sanity test/runner/ ${FLAGS} - -.PHONY: unit -unit: - PYTHONPATH=.:.. pytest unit ${FLAGS} diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index dff84c62d07..8efa99592f3 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -6916,10 +6916,10 @@ test/legacy/gce_credentials.py metaclass-boilerplate test/legacy/gce_credentials.py pylint:blacklisted-name test/legacy/setup_gce.py future-import-boilerplate test/legacy/setup_gce.py metaclass-boilerplate -test/runner/requirements/constraints.txt test-constraints -test/runner/requirements/integration.cloud.azure.txt test-constraints -test/runner/setup/windows-httptester.ps1 pslint:PSCustomUseLiteralPath -test/sanity/pylint/plugins/string_format.py use-compat-six +test/lib/ansible_test/_data/requirements/constraints.txt test-constraints +test/lib/ansible_test/_data/requirements/integration.cloud.azure.txt test-constraints +test/lib/ansible_test/_data/setup/windows-httptester.ps1 pslint:PSCustomUseLiteralPath +test/lib/ansible_test/_data/sanity/pylint/plugins/string_format.py use-compat-six test/units/cli/arguments/test_optparse_helpers.py future-import-boilerplate test/units/config/manager/test_find_ini_config_file.py future-import-boilerplate test/units/contrib/inventory/test_vmware_inventory.py future-import-boilerplate