ansible/test/units
Sam Doran e8d4b62b41
Fix YAML error message when error is at the end of the file (#73241)
* Fix YAML error message when error is at the end of the file

If a YAML file fails to load due to a syntax error in a file, or there is an error in the last line of a
file, PyYAML reports the last line number of the file as the index where the error occurred.

When reading the file lines, we use that index to the get the relevant line.  If the index value is out
of range, the relevant line is lost for error reporting.

Subtract one from the index value to avoid the IndexError in this specific scenario. It is possible
to still get an IndexError, which will be handled as it is currently.

* Update existing tests and add new tests
2021-01-19 10:07:36 -05:00
..
_vendor transparent downstream vendoring (#69850) 2020-06-15 16:22:25 -07:00
ansible_test [ansible-test] attempt to work around podman (#72096) 2020-10-05 20:13:52 -05:00
cli Make test_adhoc succeed from within a git checkout 2021-01-13 21:22:21 +01:00
compat
config Provide better decryption errors for single vault values (#72362) 2020-11-18 14:25:32 -06:00
errors Fix YAML error message when error is at the end of the file (#73241) 2021-01-19 10:07:36 -05:00
executor Add implicit role_complete block instead of role._eor (#72208) 2020-12-09 09:53:01 +01:00
galaxy galaxy: handle plus sign in user token appearing in role url (#73057) 2021-01-06 10:50:44 -05:00
inventory Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
inventory_test_data/group_vars
mock Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
module_utils facts - properly report virtualization facts for Linux guests on bhyve (#73204) 2021-01-14 10:53:03 -05:00
modules iptables: Added set module/match_set support (#72984) 2021-01-11 16:32:53 -05:00
parsing vault: Read stdin data as binary on python3 (#52229) 2020-12-09 09:46:32 +01:00
playbook Add implicit role_complete block instead of role._eor (#72208) 2020-12-09 09:53:01 +01:00
plugins Ensure Ansible's unique filter preserves order (#67856) 2020-11-23 08:55:18 +01:00
regex
template
utils saner path dir management (#72648) 2020-12-14 19:30:13 -05:00
vars
__init__.py
requirements.txt Remove unnecessary unit test requirements. 2020-03-23 11:14:21 -05:00
test_constants.py Remove some constants.py deprecated items (#70466) 2020-07-07 18:41:19 -05:00
test_context.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00