Skip to content

Commit 8ba5111

Browse files
author
Pere Urbon-Bayes
committed
add test for the new port field
1 parent 6558ef1 commit 8ba5111

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/inputs/tcp_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@
269269
end
270270
end
271271

272+
it "should add the host and port to the generated event" do
273+
events.each do |event|
274+
expect(event["host"]).to eq("127.0.0.1")
275+
expect(event["port"]).to be_an(Fixnum)
276+
end
277+
end
272278
end
273279

274280
it_behaves_like "an interruptible input plugin" do

0 commit comments

Comments
 (0)