mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
- add tests to cover grok singles with duplicate field names
This commit is contained in:
parent
4155a8bc0e
commit
1ceeed8628
1 changed files with 19 additions and 0 deletions
|
@ -409,4 +409,23 @@ describe LogStash::Filters::Grok do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "singles with duplicate-named fields" do
|
||||||
|
config <<-CONFIG
|
||||||
|
filter {
|
||||||
|
grok {
|
||||||
|
match => [ "message", "%{INT:foo}|%{WORD:foo}" ]
|
||||||
|
singles => true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CONFIG
|
||||||
|
|
||||||
|
sample "hello world" do
|
||||||
|
insist { subject["foo"] }.is_a?(String)
|
||||||
|
end
|
||||||
|
|
||||||
|
sample "123 world" do
|
||||||
|
insist { subject["foo"] }.is_a?(String)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue