Closed mashhurs closed 1 year ago
@mashhurs Thanks for improving the test cases. I have one suggestion to make the test case aligned with the others.
@kaisecheng if we align on default Line
codec, the solution would be
expect( event.get('[event][original]').strip ).to eql stdin_data.strip
and I have applied it.
Details: we receive the data with \n
(new line) in 7.x with ECS disabled because we are directly calling process()
, so need to apply the strip on both received event and expected data.
Description
This change fixes the test case failure, example failure.
Details: the root cause for test failure is, we ca calling directly
process()
method of the plugin. For the real scenarios,StdinChannel::Reader.new
or standard$stdin
escapes the new line. So, in the test cases, changed plugin defaultLine
codec toJSON
codec to avoid the new line (\n
).