mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Add test to reproduce LOGSTASH-757
This commit is contained in:
parent
d7869d5e89
commit
c46a8627fb
1 changed files with 17 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue