1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-05 07:47:12 +00:00
community.general/tests/integration
Alexei Znamensky 15616be827
xml: fix predicated xpath no-match incorrectly creating nodes (#12031)
* fix(xml): no-op when predicated xpath finds no match instead of creating nodes

When using xpath like element[text()='old'] with value=new, a no-match due
to the predicate not being satisfied incorrectly triggered node creation,
corrupting the XML. Now treats predicate misses as a no-op.

Fixes #8730

* changelog(xml): add fragment for PR #12031

* fix(xml): remove spurious test-unset-element-value include from main.yml

That file belongs to a different branch and was accidentally dragged in
during a stash conflict resolution.

* feat(xml): add create_if_missing option to control node creation on value no-match

Instead of implicitly creating nodes when value is set and xpath finds no match,
expose create_if_missing (default true, preserving old behavior) so callers
can opt into a silent no-op with create_if_missing=false.

Fixes #8730
2026-05-17 10:48:56 +02:00
..
targets xml: fix predicated xpath no-match incorrectly creating nodes (#12031) 2026-05-17 10:48:56 +02:00
requirements.yml Adjust YAML files (#10233) 2025-06-15 09:13:16 +02:00