You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/lib/ansible_test/_util/controller/sanity
Evgeni Golov a7111c4dbb
validate-modules: don't fail on invalid YAML (#79682)
* validate-modules: don't fail on invalid YAML

When validate-modules encounters invalid YAML (e.g. in the EXAMPLES
section), it tries to reformat the exception to include the line number
in the Python file instead of the line number of the embedded YAML
document. However, PyYAML doesn't allow modification of the Mark object
(anymore) which leads to a new exception being raised, instead of
reporting the original exception.

As the original exception is not needed in other places anymore, we
don't have to modify it at all and can just compute the right line
number when reporting the error via ansible-test.

Fixes: #75837

* Add test for invalid module doc YAML syntax.

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
..
code-smell runtime-metadata sanity test: ensure redirects are FQCRs (#78802) 3 years ago
integration-aliases ansible-test - Clean up future boilerplate. (#76874) 4 years ago
mypy Add find_spec and exec_module to RestrictedModuleLoader (#76427) 4 years ago
pep8 ansible-test - Move code from _data to _util. (#75495) 5 years ago
pslint Fix up sanity problems 3 years ago
pylint ansible-test - Improve container management. (#78550) 3 years ago
shellcheck ansible-test - Move code from _data to _util. (#75495) 5 years ago
validate-modules validate-modules: don't fail on invalid YAML (#79682) 3 years ago
yamllint ansible-test - Code cleanup. 4 years ago