- add test coverage for grok fields with dashes in them

This commit is contained in:
Jordan Sissel 2013-05-03 09:05:15 -07:00
parent fe859f9464
commit 146b649e20

View file

@ -295,4 +295,19 @@ describe LogStash::Filters::Grok do
insist { subject["stimestamp"] } == "2011/01/01"
end
end
describe "allow dashes in capture names" do
config <<-CONFIG
filter {
grok {
pattern => "%{WORD:foo-bar}"
singles => true
}
}
CONFIG
sample "hello world" do
insist { subject["foo-bar"] } == "hello"
end
end
end