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/units
Sam Doran e75570ba83
[stable-2.10] Fix YAML error message when error is at the end of the file (#73241) (#73296)
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
(cherry picked from commit e8d4b62b41)

Co-authored-by: Sam Doran <sdoran@redhat.com>
4 years ago
..
_vendor transparent downstream vendoring (#69850) 5 years ago
ansible_test Add Azure Pipelines support to ansible-test. 5 years ago
cli Remove ansible-galaxy login (#72288) (#72320) 4 years ago
compat Move unit test compat code out of `lib/ansible/`. (#46996) 6 years ago
config [stable-2.10] Clean up unit test boilerplate. 4 years ago
errors [stable-2.10] Fix YAML error message when error is at the end of the file (#73241) (#73296) 4 years ago
executor fix internal cases of actions calling unqualified module names (#70818) (#70840) 4 years ago
galaxy Remove ansible-galaxy login (#72288) (#72320) 4 years ago
inventory [stable-2.10] Clean up unit test boilerplate. 4 years ago
inventory_test_data/group_vars Merge branch 'v2_final' into devel_switch_v2 10 years ago
mock [stable-2.10] Clean up unit test boilerplate. 4 years ago
module_utils [stable-2.10] facts - properly report virtualization facts for Linux guests on bhyve (#73204). (#73233) 4 years ago
modules [stable-2.10] iptables: Reorder comment postition (#71496) (#72548) 4 years ago
parsing [stable-2.10] Ensure single vaulted values aren't counted as sequences. Fixes #70784 (#70786) (#70791) 4 years ago
playbook [stable-2.10] Clean up unit test boilerplate. 4 years ago
plugins powershell - fix nested CLIXML parser (#71412) (#71451) 4 years ago
regex Add toggle to control invalid character substitution in group names (#52748) 6 years ago
template Do not treat AnsibleUndefined as being unsafe (#65202) 5 years ago
utils Add deprecation collection name to plugin options (#71735) (#72081) 4 years ago
vars Remove empty setUp/tearDown/tearDownClass methods in test classes. 5 years ago
__init__.py Add empty-init code-smell script. (#18406) 8 years ago
requirements.txt Remove unnecessary unit test requirements. 5 years ago
test_constants.py [stable-2.10] Clean up unit test boilerplate. 4 years ago
test_context.py [stable-2.10] Clean up unit test boilerplate. 4 years ago