magnusbaeck / logstash-filter-verifier

Apache License 2.0
192 stars 27 forks source link

YAML testcase input #102

Open nicolasreich opened 3 years ago

nicolasreich commented 3 years ago

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
breml commented 3 years ago

@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

nicolasreich commented 3 years ago

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