xml: fail for non-string values (#11959)

* fix(xml): coerce boolean values to string with a warning

Fixes #7171

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(xml): add integration tests for boolean value handling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* changelog: add fragment for PR 11959

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* 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.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* adjustments from review

* fix(xml): correct boolean test assertions to match actual error message format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexei Znamensky
2026-05-07 05:23:58 +12:00
committed by GitHub
parent 60cb5cd679
commit d87a8a167f
4 changed files with 74 additions and 0 deletions

View 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)."