- Add test to reproduce LOGSTASH-757

This commit is contained in:
Jordan Sissel 2012-12-11 01:22:51 -08:00
parent d7869d5e89
commit c46a8627fb

View file

@ -133,7 +133,7 @@ describe LogStash::Filters::Mutate do
end
end
describe "regression - check grok+mutate" do
describe "regression - mutate should lowercase a field created by grok" do
config <<-CONFIG
filter {
grok {
@ -149,4 +149,20 @@ describe LogStash::Filters::Mutate do
insist { subject["foo"] } == ['hello']
end
end
describe "LOGSTASH-757: rename should do nothing with a missing field" do
config <<-CONFIG
filter {
mutate {
rename => [ "nosuchfield", "hello" ]
}
}
CONFIG
sample "whatever" do
reject { subject.fields }.include?("nosuchfield")
reject { subject.fields }.include?("hello")
end
end
end