mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Fix file output tests (broken by removal of Event::from_json)
This commit is contained in:
parent
4a035d295f
commit
870e4def19
1 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ describe LogStash::Outputs::File do
|
|||
line_num = 0
|
||||
# Now check all events for order and correctness.
|
||||
File.foreach(tmp_file) do |line|
|
||||
event = LogStash::Event.from_json(line)
|
||||
event = LogStash::Event.new(JSON.parse(line))
|
||||
insist {event["message"]} == "hello world"
|
||||
insist {event["sequence"]} == line_num
|
||||
line_num += 1
|
||||
|
@ -61,7 +61,7 @@ describe LogStash::Outputs::File do
|
|||
line_num = 0
|
||||
# Now check all events for order and correctness.
|
||||
Zlib::GzipReader.new(File.open(tmp_file)).each_line do |line|
|
||||
event = LogStash::Event.from_json(line)
|
||||
event = LogStash::Event.new(JSON.parse(line))
|
||||
insist {event["message"]} == "hello world"
|
||||
insist {event["sequence"]} == line_num
|
||||
line_num += 1
|
||||
|
@ -71,7 +71,7 @@ describe LogStash::Outputs::File do
|
|||
#LOGSTASH-997 confirm usage of zcat command on file
|
||||
line_num = 0
|
||||
`zcat #{tmp_file.path()}`.split("\n").each do |line|
|
||||
event = LogStash::Event.from_json(line)
|
||||
event = LogStash::Event.new(JSON.parse(line))
|
||||
insist {event["message"]} == "hello world"
|
||||
insist {event["sequence"]} == line_num
|
||||
line_num += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue