1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-29 23:49:09 +00:00
community.general/tests/integration/targets/xml/results
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
..
test-add-children-elements-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-elements-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-elements.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-elements.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-from-groupvars.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-from-groupvars.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-insertafter.xml Initial commit 2020-03-09 09:11:07 +00:00
test-add-children-insertafter.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-insertbefore.xml Initial commit 2020-03-09 09:11:07 +00:00
test-add-children-insertbefore.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-with-attributes-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-with-attributes-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-with-attributes.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-with-attributes.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-element-implicitly.xml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
test-add-element-implicitly.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-namespaced-children-elements.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-namespaced-children-elements.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-pretty-print-only.xml Initial commit 2020-03-09 09:11:07 +00:00
test-pretty-print-only.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-pretty-print.xml Initial commit 2020-03-09 09:11:07 +00:00
test-pretty-print.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-attribute.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-attribute.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-element.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-element.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-namespaced-attribute.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-namespaced-attribute.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-namespaced-element.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-namespaced-element.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-attribute-value-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-attribute-value-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-attribute-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-attribute-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-children-elements-empty-list.xml xml children module parameter does not exist (#5808) 2023-01-14 18:22:00 +01:00
test-set-children-elements-empty-list.xml.license xml children module parameter does not exist (#5808) 2023-01-14 18:22:00 +01:00
test-set-children-elements-level.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-children-elements-level.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-children-elements-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-children-elements-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-children-elements-value.xml add special word '+value' to add_children/set_children in xml module (#8437) 2025-05-31 16:42:24 +02:00
test-set-children-elements-value.xml.license add special word '+value' to add_children/set_children in xml module (#8437) 2025-05-31 16:42:24 +02:00
test-set-children-elements.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-children-elements.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-element-value-empty.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-element-value-empty.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-element-value-predicate.xml xml: fix predicated xpath no-match incorrectly creating nodes (#12031) 2026-05-17 10:48:56 +02:00
test-set-element-value-predicate.xml.license xml: fix predicated xpath no-match incorrectly creating nodes (#12031) 2026-05-17 10:48:56 +02:00
test-set-element-value-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-element-value-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-element-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-element-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-namespaced-attribute-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-namespaced-attribute-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-namespaced-element-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-namespaced-element-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00