Felix Fontein
29aef842d7
ansible-test: make sure tests are also run for the new plugin types ( #73599 )
...
* Make sure tests are also run for the new plugin types.
* New plugin types are not documentable.
2021-02-13 14:05:16 -08:00
Matt Clay
73fadc5e97
Clean up code in ansible-test. ( #73379 )
...
* Relocate code to fix type dependencies.
* Fix missing and unused imports.
* Fix type hints.
* Suppress PyCharm false positives.
* Avoid shadowing `file` built-in.
* Use json.JSONEncoder directly instead of super().
This matches the recommended usage and avoids a PyCharm warning.
* Remove redundant regex escape.
* Remove redundant find_python call.
* Use tarfile.open directly.
* Add changelog fragment.
2021-01-26 14:02:08 -08:00
Matt Clay
8d92df4537
Test netconf plugins in ansible-doc sanity test.
2020-06-24 15:53:32 -07:00
Felix Fontein
0b82d4499e
ansible-test ansible-doc sanity test: also run with --json parameter ( #69288 )
2020-05-29 08:52:29 -07:00
Matt Clay
f4a80bb600
Code cleanup and refactoring in ansible-test. ( #67063 )
...
* Code cleanup in ansible-test.
* Split out encoding functions.
* Consoldate loading of JSON files.
* Split out disk IO functions.
* Simplify file access.
* Add functions for opening files.
* Replace open calls with appropriate functions.
* Expose more types from typing module.
* Support writing compact JSON.
* Add verbosity argument to display.warning.
* Add changelog entry.
* Update files overlooked during rebase.
* Use `io.open` instead of `open`.
* Fix file opening for imp.load_module.
* Remove use of `r+` mode to access files.
* Add missing import.
* Fix httptester on Python 2.x.
* Clarify changelog fragment.
* Consolidate imports. Remove extra newlines.
* Fix indirect imports.
2020-02-04 11:21:53 -08:00
Matt Clay
064e8e1ef4
Fix ansible-doc traceback and sanity test. ( #62040 )
...
* Fix ansible-doc traceback for removed modules.
This avoids tracebacks with errors like the following when a module has been removed:
module module_name missing documentation (or could not parse documentation): 'NoneType' object does not support item assignment
* Fix ansible-doc sanity test warning handling.
Warnings about removed modules/plugins on stderr are now properly ignored.
Previously an ansible-doc error could result in unrelated errors going undetected because tests were stopped early and the underlying error was ignored.
2019-09-10 00:29:34 -07:00
Matt Clay
e258ba703e
Improve ansible-test env display. ( #61339 )
...
* Improve ansible-test env display.
* Fix PyCharm warnings.
* Fix ansible-test ansible-doc sanity test with -e.
2019-08-26 14:02:55 -07:00
Matt Clay
d651bda123
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.
2019-08-06 14:43:29 -07:00