1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-04 23:37:12 +00:00
community.general/tests
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
..
integration xml: fix predicated xpath no-match incorrectly creating nodes (#12031) 2026-05-17 10:48:56 +02:00
sanity Drop support for ansible-core 2.17 (#11906) 2026-04-20 21:04:58 +02:00
unit Improve --docker arguments to ansible-test (#12070) 2026-05-17 10:47:56 +02:00
utils CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12052) 2026-05-15 10:08:58 +02:00
.gitignore New module git config info (#7587) 2023-11-29 08:37:50 +01:00
config.yml
galaxy-importer.cfg Zuul third-party-check: disable ansible-doc part of galaxy-importer (#7907) 2024-01-27 15:28:10 +01:00