mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- add test coverage for grok fields with dashes in them
This commit is contained in:
parent
fe859f9464
commit
146b649e20
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue