Commit Graph

125 Commits (5ac2c6d4fe97ec3e2c25ce53bc6daaead0d8f3b4)

Author SHA1 Message Date
Matt Clay 4255ee8e5a Prepare ansible-test for collections support.
Another round of changes to prepare ansible-test for supporting collections to help keep later PRs a manageable size.
5 years ago
Matt Clay f81238012b Clean up pylint issues in test infra. 5 years ago
Matt Clay 6645054329
Code cleanup for test infrastructure. (#59046)
* Remove useless object inheritance in test code.
* Remove unnecessary pass statements from test code.
* Comment on why certain pylint rules are ignored.
* Add more pylint test contexts.
* Fix import order.
* Remove unused variables.
* Remove unnecessary pass statement.
* Fix bad continuations.
* Remove unnecessary elif.
* Allow legitimate broad except statements.
* Allow legitimate protected access.
* Clean up names to make pylint pass.
5 years ago
Matt Clay 3f2b766d10 Add future and metaclass boilerplate to test code.
Continue to ignore:

- test/integration/
- test/legacy/
- test/units/
5 years ago
Matt Clay 6327a6114b Add ansible-test units --num-workers option. 5 years ago
Matt Clay bc3a599678 Fix invalid type hints in ansible-test. 5 years ago
Matt Clay 86ad4c99ba Reorganize util code in ansible-test.
Code in util.py that depends on CommonConfig is now in util_common.py.
5 years ago
Matt Clay c79afb1cba Move ansible-test unit coverage code into plugin. 5 years ago
Matt Clay 1e1463401d
Prepare ansible-test for supporting collections. (#58886)
This is a small but incomplete set of the initial changes for supporting testing of collections with ansible-test.
5 years ago
Matt Clay 4403f866e3 Simplify Git class in ansible-test. 5 years ago
Matt Clay b06f5634c5 Simplify ansible-test target expansion.
Targets are always expanded to full lists now instead of optimizing
for shorter lists by collapsing directories.

This change only affects unit tests and the ansible-doc sanity test,
as they were the only remaining tests using the old behavior.
5 years ago
Matt Clay 817ec5ab48 Add PyYAML check for libyaml support. 5 years ago
Martin Krizek 484c023316
ansible-test: prefer shlex.quote (#56823) 5 years ago
Matt Clay 864bd941af Add support for isolated virtualenv in tests. 5 years ago
Matt Clay a4d0c24bbf
Fix ansible-test inventory and vars path handling. (#55186)
* Fix ansible-test inventory and vars path handling.
* Improve explanation for missing commit.
6 years ago
Matt Clay a4c42ba687
Update the default test container to 1.7.0. (#54930)
* Update the default test container to 1.7.0.
* Run `pip check` after installing test requirements.
* Support older versions of pip.
* Remove obsolete pip error handler.
6 years ago
Matt Clay 785afc7a53
Improve ansible-test python interpreter selection. (#54445) 6 years ago
Matt Clay 89a022b6a0 Update handling of the non_local test alias.
Previously the alias disabled all code coverage collection.
Now it only disables Ansible module code coverage collection.
6 years ago
Matt Clay a8e328f474
Overhaul ansible-test code coverage and injector. (#53510) 6 years ago
Matt Clay 8535c05b29 Add ansible-test finally block after tests run.
This will record data from passing tests even when tests fail.
6 years ago
Jordan Borean 8ef2e6da05 Add support for Windows hosts in the SSH connection plugin (#47732)
* Add support for Windows hosts in the SSH connection plugin

* fix Python 2.6 unit test and sanity issues

* fix up connection tests in CI, disable SCP for now

* ensure we don't pollute the existing environment during the test

* Add connection_windows_ssh to classifier

* use test dir for inventory file

* Required powershell as default shell and fix tests

* Remove exlicit become_methods on connection

* clarify console encoding comment

* ignore recent SCP errors in integration tests

* Add cmd shell type and added more tests

* Fix some doc issues

* revises windows faq

* add anchors for windows links

* revises windows setup page

* Update changelogs/fragments/windows-ssh.yaml

Co-Authored-By: jborean93 <jborean93@gmail.com>
6 years ago
Matt Clay 156613f025 Fix coverage handling for non_local tests. 6 years ago
Matt Clay eeaff731de
Overhaul ansible-test cloud test plugins. (#53044) 6 years ago
Matt Clay 6a82827ddd Add Python 3.8 to ansible-test and CI. 6 years ago
Jordan Borean ce8db479f0
ansible-test: make the httptester for Windows more resiliant around the shell chosen (#51416) 6 years ago
Matt Clay b834b29e43 Run integration tests from temporary directory.
ci_complete
6 years ago
Matt Clay eee3dc888b Pass ansible-test inventory path to test funcs.
This avoids declaring the inventory path/names in multiple places.
Also expose the inventory path using the INVENTORY_PATH env var.
6 years ago
Matt Clay 3b705efc93 Fix ansible-test skip warning message. 6 years ago
Matt Clay 0826a00803 Add `--raw` option to ansible-test shell command.
It is currently supported only with the `--remote` option.

This makes it easier to troubleshoot new instances which are not
yet supported by the setup scripts used by ansible-test.
6 years ago
Matt Clay 8066acc90c
Support skip of platforms by version in tests. (#48826)
* Support skip of platforms by version in tests.

Previously a remote platform could be skipped completely using the alias:

`skip/{platform}` such as `skip/rhel`

Now a specific platform version can be skipped using the alias:

`skip/{platform}{version}` such as `skip/rhel7.6`

This feature is available for platforms specified with the `--remote` option.

* Add skip by version to the docs.
6 years ago
Matt Clay fa53b4805b Fix ansible-test interpreter tracking.
Track the interpreter for each copy of the injector by the interpreter
path instead of the interpreter version. This avoids the possibility
of mixing different interpreters with the same version.
6 years ago
Matt Clay eec21a3d12 Use correct interpreter for ansible-test injector. 6 years ago
Jordan Borean 9a5561da0f
ansible-test: setup up http runner in between each target (#47100)
* ansible-test: setup up http runner in between each target

* review changes
6 years ago
Jordan Borean 69e1088ec1
ansible-test: run win httptester with bypass policy (#47090) 6 years ago
Matt Clay 38eba60849 Fix ansible-test --exclude with delegation.
Previously the option worked with integration commands but not units or sanity.
6 years ago
Jordan Borean 6e2897647c
win test: add http tester container to Windows tests (#46606) 6 years ago
Jordan Borean 0f5331645f
ansible-test: add skip/windows/... alias to skip tests on specific Windows versions (#46845)
* ansible-test: add skip/windows/... alias to skip tests on specific Windows versions

* show what tests were skipped

* changes to logic to only skip if all Windows targets are set to skip

* codestyle improvements

* change warning message based on review

* check args type before running the Windows path
6 years ago
Matt Clay ec88510fd4 Add OUTPUT_DIR env var to integration tests. 6 years ago
Matt Clay 712ad9ed64 Fix ansible-test custom docker image traceback. 6 years ago
Matt Clay 0dc7f38787
Improve ansible-test environment checking between tests. (#46459)
* Add unified diff output to environment validation.

This makes it easier to see where the environment changed.

* Compare Python interpreters by version to pip shebangs.

This helps expose cases where pip executables use a different
Python interpreter than is expected.

* Query `pip.__version__` instead of using `pip --version`.

This is a much faster way to query the pip version. It also more
closely matches how we invoke pip within ansible-test.

* Remove redundant environment scan between tests.

This reuses the environment scan from the end of the previous test
as the basis for comparison during the next test.
6 years ago
Matt Clay e53390b3b1
Fix ansible-test multi-group smoke test handling. (#46363)
* Fix ansible-test smoke tests across groups.
* Fix ansible-test list arg defaults.
* Fix ansible-test require and exclude delegation.
* Fix detection of Windows specific changes.
* Add minimal Windows testing for Python 3.7.
6 years ago
Matt Clay 54937ba784 Fix ansible-test docker python version handling.
This removes the old name based version detection behavior and
uses versions defined in the docker completion file instead, as
the new containers do not follow the old naming scheme.
6 years ago
Matt Clay ac492476e5
Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.
6 years ago
Jordan Borean 27c10fa502
add skip/docker alias to skip tests when running on Docker (#45955)
* add skip/docker alias to skip tests when running on Docker

* changed warning message wording
6 years ago
Matt Clay abe8e4c9e8
Run unit tests in parallel. (#45812) 6 years ago
Matt Clay 379a7f4f5a
Fix ansible-test unit test execution. (#45772)
* Fix ansible-test units requirements install.
* Run unit tests as unprivileged user under Docker.
6 years ago
Matt Clay c1f9efabf4
Overhaul httptester support in ansible-test. (#39892)
- Works with the --remote option.
- Can be disabled with the --disable-httptester option.
- Change image with the --httptester option.
- Only load and run httptester for targets that require it.
6 years ago
Matt Clay 8a223009ca
Improve handling of integration test aliases. (#38698)
* Include change classification data in metadata.
* Add support for disabled tests.
* Add support for unstable tests.
* Add support for unsupported tests.
* Overhaul integration aliases sanity test.
* Update Shippable scripts to handle unstable tests.
* Mark unstable Azure tests.
* Mark unstable Windows tests.
* Mark disabled tests.
7 years ago
Matt Clay a5cbc0a2c8
Multiple ansible-test fixes. (#38247)
* Add ansible-test integration --allow-root option.
* Fix destructive target override.
* Fix bad type hint SanityResult -> TestResult.
* Fix skip/python3 filtering with --docker option.
7 years ago
Matt Clay a8487feb70 Fix ansible-test python and pip executable search. 7 years ago