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
Evgeni Golov a398724a31 [stable-2.14] 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>
(cherry picked from commit a7111c4dbb)

Co-authored-by: Evgeni Golov <evgeni@golov.de>
2 years ago
..
ansible_test ansible-test - Move code from _data to _util. (#75495) 3 years ago
integration [stable-2.14] validate-modules: don't fail on invalid YAML (#79682) 2 years ago
lib/ansible_test [stable-2.14] validate-modules: don't fail on invalid YAML (#79682) 2 years ago
sanity Prevent stdio deadlock in forked children (#79522) (#79539) 2 years ago
support [stable-2.14] Add `use_rsa_sha2_algorithms` option for paramiko (#78789) (#78842) 2 years ago
units mention acl in permissions errors (#79209) (#79250) 2 years ago
utils/shippable Update test matrix symlinks. (#78737) 2 years ago