Entity
- Name:
elasticstack_elasticsearch_ingest_processor_json
- Type: data source
- Implementation:
internal/elasticsearch/ingest/processor_json_pf_data_source.go
- Acceptance tests:
internal/elasticsearch/ingest/processor_json_data_source_test.go
1) Attributes with no coverage
None. Every schema attribute (id, json, field, target_field, add_to_root, add_to_root_conflict_strategy, allow_duplicate_keys, description, if, ignore_failure, on_failure, tag) is configured and/or asserted in at least one test step.
2) Attributes with poor coverage
add_to_root (Optional, bool): only ever asserted as true (in the add_to_root step). Never asserted as false/absent, so the default/mutually-exclusive-with-target_field behavior is untested.
add_to_root_conflict_strategy (Optional, string, OneOf("replace", "merge")): only "merge" is ever exercised; "replace" is never tested.
allow_duplicate_keys (Optional, bool): only ever asserted as true (in all_attributes). Never asserted as false/absent, and no update coverage.
description / if / tag (Optional, string): each has exactly one non-default value tested (in all_attributes) with no explicit absence assertion in the other steps (read, add_to_root, updated_values) and no update coverage (value never changes across steps).
on_failure (Optional, list of normalized JSON): asserted with exactly one entry in all_attributes (on_failure.# = 1); not asserted absent in the other steps, and no coverage of multiple entries or of the list changing across an update step.
Prioritized top 5 gaps
add_to_root_conflict_strategy — only one of its two valid values ("merge") is ever exercised; "replace" is untested.
add_to_root — only tested as true; no coverage of the false/unset default.
allow_duplicate_keys — only tested as true; no false/unset coverage, no update coverage.
on_failure — single-entry only; no multi-entry or update coverage.
description / if / tag — single value each, no absence assertions outside all_attributes, no update coverage.
Concrete acceptance-test additions
- Add a step (or extend an existing one) that sets
add_to_root_conflict_strategy = "replace" and asserts the resulting attribute value and JSON body.
- Add explicit
resource.TestCheckNoResourceAttr assertions for add_to_root and allow_duplicate_keys in steps where they are omitted (e.g. read), to lock in default/unset behavior.
- Extend the
updated_values step to also change description, if, tag, and on_failure (not just field/target_field), asserting the new values to add update coverage for these attributes.
- Add a step configuring
on_failure with two entries and assert on_failure.# = 2 plus CheckResourceJSON for each entry.
Generated by Schema Coverage Rotation · sonnet50 · 18.3 AIC · ⌖ 0.529 AIC · ◷
Entity
elasticstack_elasticsearch_ingest_processor_jsoninternal/elasticsearch/ingest/processor_json_pf_data_source.gointernal/elasticsearch/ingest/processor_json_data_source_test.go1) Attributes with no coverage
None. Every schema attribute (
id,json,field,target_field,add_to_root,add_to_root_conflict_strategy,allow_duplicate_keys,description,if,ignore_failure,on_failure,tag) is configured and/or asserted in at least one test step.2) Attributes with poor coverage
add_to_root(Optional, bool): only ever asserted astrue(in theadd_to_rootstep). Never asserted asfalse/absent, so the default/mutually-exclusive-with-target_fieldbehavior is untested.add_to_root_conflict_strategy(Optional, string,OneOf("replace", "merge")): only"merge"is ever exercised;"replace"is never tested.allow_duplicate_keys(Optional, bool): only ever asserted astrue(inall_attributes). Never asserted asfalse/absent, and no update coverage.description/if/tag(Optional, string): each has exactly one non-default value tested (inall_attributes) with no explicit absence assertion in the other steps (read,add_to_root,updated_values) and no update coverage (value never changes across steps).on_failure(Optional, list of normalized JSON): asserted with exactly one entry inall_attributes(on_failure.#=1); not asserted absent in the other steps, and no coverage of multiple entries or of the list changing across an update step.Prioritized top 5 gaps
add_to_root_conflict_strategy— only one of its two valid values ("merge") is ever exercised;"replace"is untested.add_to_root— only tested astrue; no coverage of thefalse/unset default.allow_duplicate_keys— only tested astrue; nofalse/unset coverage, no update coverage.on_failure— single-entry only; no multi-entry or update coverage.description/if/tag— single value each, no absence assertions outsideall_attributes, no update coverage.Concrete acceptance-test additions
add_to_root_conflict_strategy = "replace"and asserts the resulting attribute value and JSON body.resource.TestCheckNoResourceAttrassertions foradd_to_rootandallow_duplicate_keysin steps where they are omitted (e.g.read), to lock in default/unset behavior.updated_valuesstep to also changedescription,if,tag, andon_failure(not justfield/target_field), asserting the new values to add update coverage for these attributes.on_failurewith two entries and asserton_failure.#=2plusCheckResourceJSONfor each entry.