Spec DNS filter: append action with multi-value input skips lookup

This commit is contained in:
Laust Rud Jacobsen 2012-11-25 15:04:17 +01:00
parent a15c9203ae
commit 51edc70306
2 changed files with 16 additions and 10 deletions

View file

@ -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

View file

@ -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 {