mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #11959/d87a8a16 backport][stable-12] xml: fail for non-string values (#12001)
xml: fail for non-string `value`s (#11959)
* fix(xml): coerce boolean values to string with a warning
Fixes #7171
* test(xml): add integration tests for boolean value handling
* changelog: add fragment for PR 11959
* adjustments from review
* test(xml): update boolean-value integration tests to expect failure
Now that xml fails on non-string values, replace the old success-path
tests with failure assertions and add a positive test for quoted strings.
Remove the no-longer-needed result XML fixtures.
* adjustments from review
* fix(xml): correct boolean test assertions to match actual error message format
---------
(cherry picked from commit d87a8a167f)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
changelogs/fragments/11959-xml-boolean-value.yml
Normal file
4
changelogs/fragments/11959-xml-boolean-value.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
bugfixes:
|
||||
- "xml - emit an error when ``value`` is not a string, pointing to the offending xpath
|
||||
(https://github.com/ansible-collections/community.general/issues/7171,
|
||||
https://github.com/ansible-collections/community.general/pull/11959)."
|
||||
Reference in New Issue
Block a user