master
yaml 23 lines 603 Bytes
Raw
1 # Test unmatched line handling
2 pattern: "^VALID:\\s+(?P<data>.*)"
3
4 inject:
5 - key: NORMAL_INJECT
6 value: "always present"
7
8 unmatched:
9 key: PARSE_ERROR
10 inject:
11 - key: ERROR_TYPE
12 value: "INVALID_FORMAT"
13 - key: TIMESTAMP
14 value: "2024-01-01T00:00:00Z"
15 - key: HOSTNAME
16 value: "localhost"
17
18 # Test with valid line: "VALID: some data"
19 # Expected: NORMAL_INJECT, DATA should appear
20
21 # Test with invalid line: "INVALID: some data"
22 # Expected: PARSE_ERROR, ERROR_TYPE, TIMESTAMP, HOSTNAME should appear
23 # But NOT NORMAL_INJECT (only unmatched injections for unmatched lines)