mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Spec DNS filter: append action with multi-value input skips lookup
This commit is contained in:
parent
a15c9203ae
commit
51edc70306
2 changed files with 16 additions and 10 deletions
|
@ -4,7 +4,6 @@ require "logstash/filters/dns"
|
|||
describe LogStash::Filters::DNS do
|
||||
extend LogStash::RSpec
|
||||
|
||||
|
||||
describe "dns reverse lookup, replace (on event.source)" do
|
||||
config <<-CONFIG
|
||||
filter {
|
||||
|
@ -126,6 +125,21 @@ describe LogStash::Filters::DNS do
|
|||
end
|
||||
end
|
||||
|
||||
describe "dns resolve lookup, append with multi-value does nothing" do
|
||||
config <<-CONFIG
|
||||
filter {
|
||||
dns {
|
||||
resolve => "foo"
|
||||
action => "append"
|
||||
}
|
||||
}
|
||||
CONFIG
|
||||
|
||||
sample({"@fields" => { "foo" => ["carrera.databits.net", "foo.databits.net"]}}) do
|
||||
insist { subject["foo"] } == ["carrera.databits.net", "foo.databits.net"]
|
||||
end
|
||||
end
|
||||
|
||||
describe "dns resolve lookup, not a valid hostname" do
|
||||
config <<-CONFIG
|
||||
filter {
|
||||
|
@ -139,10 +153,4 @@ describe LogStash::Filters::DNS do
|
|||
insist { subject["foo"] } == "does.not.exist"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
|
@ -5,8 +5,6 @@ describe LogStash::Filters::Grep do
|
|||
extend LogStash::RSpec
|
||||
|
||||
describe "single grep match" do
|
||||
# The logstash config goes here.
|
||||
# At this time, only filters are supported.
|
||||
config <<-CONFIG
|
||||
filter {
|
||||
grep {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue