magnusbaeck / logstash-filter-verifier

Apache License 2.0
191 stars 27 forks source link

internal/testcase: Support bracket field references for testcases #203

Closed magnusbaeck closed 5 days ago

magnusbaeck commented 1 week ago

Found this while working on #97. Contrary to the documentation, using bracket field references in the testcases array didn't actually work. The substitution only took place for the now-deprecated "input" key. In other words,

codec: json_lines
input:
  - '{"[foo][bar]": "value"}'

worked as expected, but

codec: json_lines
testcases:
  input: - '{"[foo][bar]": "value"}'

didn't. This has been addressed so that the "input" arrays work the same in both places.