Commit Graph

14 Commits (bad8843124a50493141a3e3d7920353239021389)

Author SHA1 Message Date
Matt Clay bad8843124
ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.
1 year ago
Matt Clay 715ab99462
ansible-test - Improve code formatting (#79983)
* ansible-test - Add blank lines after docstrings

* ansible-test - Preserve formatting of arg pairs

* ansible-test - Remove unused string

* ansible-test - Remove pointless dict() usage

* ansible-test - Clean up initial func arg indenting

* ansible-test - Clean up constructor arg indenting

* ansible-test - Clean up func arg wrapping

* ansible-test - Clean up comma and paren placement
1 year ago
Matt Clay c9f20aedc0
ansible-test - Fix various type hinting issues. (#79798)
* ansible-test - Add missing type hints.

* ansible-test - Remove redundant type hints.

* ansible-test - Fix return type annotations.

* ansible-test - Add assert, casts to assist mypy.

* ansible-test - Fix incorrect type hints.

* ansible-test - Remove no-op code.

* ansible-test - Fix incorrect types.

* ansible-test - Fix method signature mismatch.
1 year ago
Felix Fontein 1852f9fab4
Support test and filter plugins in ansible-doc sanity test (#77737)
* Support test and filter plugins in ansible-doc sanity test.

* Move integration target non-filter file check_pylint.py from filter/ to plugin_utils/.
1 year ago
Matt Clay 85acf4d1e5
ansible-test - Avoid use of deprecated type hints. (#78456)
* ansible-test - Avoid use of deprecated type hints.

PEP 585 deprecated many container types in the `typing` module in favor of the actual types, which support subscripting as of Python 3.9.

Conversion of `t.Type` was skipped since PyCharm does not currently recognize it.

* ansible-test - Fix `t` and `c` imports/shadowing.
2 years ago
Matt Clay 3eb0485dd9
ansible-test - Use more native type hints. (#78435)
* ansible-test - Use more native type hints.

Simple search and replace to switch from comments to native type hints for return types of functions with no arguments.

* ansible-test - Use more native type hints.

Conversion of simple single-line function annotation type comments to native type hints.

* ansible-test - Use more native type hints.

Conversion of single-line function annotation type comments with default values to native type hints.

* ansible-test - Use more native type hints.

Manual conversion of type annotation comments for functions which have pylint directives.
2 years ago
Matt Clay 5c2d830dea
ansible-test - Fix subprocess management. (#77641)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
* Use a Python subprocess instead of a shell.
* Use InternalError instead of Exception.
* Require capture argument.
* Check for invalid raw_command arguments.
* Removed pointless communicate=True usage.
* Relocate stdout w/o capture check.
* Use threads instead of a subprocess for IO.
2 years ago
Matt Clay 26fd5a8c3a Revert "ansible-test - Fix subprocess management. (#77638)"
This reverts commit 62d03c8e75.
2 years ago
Matt Clay 62d03c8e75
ansible-test - Fix subprocess management. (#77638)
* Run code-smell sanity tests in UTF-8 Mode.
* Update subprocess use in sanity test programs.
* Use raw_command instead of run_command with always=True set.
* Add more capture=True usage.
* Don't expose stdin to subprocesses.
* Capture more output. Warn on retry.
* Add more captures.
* Capture coverage cli output.
* Capture windows and network host checks.
* Be explicit about interactive usage.
* Use a shell for non-captured, non-interactive subprocesses.
* Add integration test to assert no TTY.
* Add unit test to assert no TTY.
* Require blocking stdin/stdout/stderr.
* Use subprocess.run in ansible-core sanity tests.
* Remove unused arg.
* Be explicit with subprocess.run check=False.
* Add changelog.
2 years ago
Felix Fontein 0990c4ca7c
Extend validate-modules to also validate plugins (#71734)
* Let validate-modules also validate plugins.

* Support 'option' in 'cli'.

* Use DOCUMENTABLE_PLUGINS instead of UNDOCUMENTED_PLUGIN_TYPES.

* Support 'keyword', clean up error codes.

* Call settings.process_errors only once; remove __version__.

* Add changelog fragment.
2 years ago
Matt Clay 4f9c7fd509 ansible-test - Remove validate-modules symlink. 2 years ago
Matt Clay 4ea8d9a782
ansible-test - split controller/target testing (#75605) 3 years ago
Matt Clay df2ae06d46 Fix ansible-test imports and paths after refactor.
Also include a changelog entry covering this commit and the previous.
3 years ago
Matt Clay bb3904d299 Reorganize command implementations.
This commit only renames existing files.

Changes to adapt imports will occur in a follow-up commit.
3 years ago