logstash-filter-verifier icon indicating copy to clipboard operation
logstash-filter-verifier copied to clipboard

YAML testcase input

Open nicolasreich opened this issue 4 years ago • 2 comments
trafficstars

Is it possible to specify the input of a test case directly in YAML instead of as a string?

Basically, write this:

---
testcases:
  - input:
      - field1: value1
        field2: value2
    expected:
      - field1: modified_value1
        field2: modified_value2

Instead of:

---
codec: json_lines
testcases:
  - input:
      - >
      {
        "field1": "value1",
        "field2": "value2"
      }
    expected:
      - field1: modified_value1
        field2: modified_value2

nicolasreich avatar Feb 11 '21 10:02 nicolasreich

@nicolasreich there is currently some work going on for logstash-filter-verifier v 2.0. There we have some ideas to make this possible. See also: https://github.com/magnusbaeck/logstash-filter-verifier/issues/94#issuecomment-770877220

breml avatar Mar 12 '21 14:03 breml

@breml cool, yeah I'm following the 2.0 work and discussion, so many great features! Big thanks to you and @magnusbaeck for this!

nicolasreich avatar Mar 15 '21 07:03 nicolasreich