spec/inputs/file_spec.rb in logstash-input-file-3.0.3 vs spec/inputs/file_spec.rb in logstash-input-file-3.1.1

- old
+ new

@@ -120,12 +120,14 @@ 2.times.collect { queue.pop } end insist { events[0].get("path") } == "my_path" insist { events[0].get("host") } == "my_host" + insist { events[0].get("[@metadata][host]") } == "#{Socket.gethostname.force_encoding(Encoding::UTF_8)}" insist { events[1].get("path") } == "#{tmpfile_path}" insist { events[1].get("host") } == "#{Socket.gethostname.force_encoding(Encoding::UTF_8)}" + insist { events[1].get("[@metadata][host]") } == "#{Socket.gethostname.force_encoding(Encoding::UTF_8)}" end context "when sincedb_path is an existing directory" do let(:tmpfile_path) { Stud::Temporary.pathname } let(:sincedb_path) { Stud::Temporary.directory }