Skip to content

Commit ea1b7bc

Browse files
committed
test: Add test about #63
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
1 parent b200721 commit ea1b7bc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_grok_parser.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,16 @@ class GrokParserTest < ::Test::Unit::TestCase
191191
error_message = error_logs.first[/error="(.+)"/, 1]
192192
assert_equal("unknown value conversion for key:'path', type:'foo'", error_message)
193193
end
194+
195+
test "keep original configuration" do
196+
config = %[
197+
<grok>
198+
pattern %{INT:user_id:integer} paid %{NUMBER:paid_amount:float}
199+
</grok>
200+
]
201+
d = create_driver(config)
202+
assert_equal("%{INT:user_id:integer} paid %{NUMBER:paid_amount:float}", d.instance.config.elements("grok").first["pattern"])
203+
end
194204
end
195205

196206
sub_test_case "grok_name_key" do

0 commit comments

Comments
 (0)