mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Disable the 'prune' filter spec because the test should have always failed, but it didn't, and I'm not sure what to do next...
This commit is contained in:
parent
4a9eafbafb
commit
ea4f4ddcee
1 changed files with 18 additions and 1 deletions
|
@ -1,7 +1,12 @@
|
|||
require "test_utils"
|
||||
require "logstash/filters/prune"
|
||||
|
||||
describe LogStash::Filters::Prune do
|
||||
# Currently the prune filter has bugs and I can't really tell what the intended
|
||||
# behavior is.
|
||||
#
|
||||
# See the 'whitelist field values with interpolation' test for a commented
|
||||
# explanation of my confusion.
|
||||
describe LogStash::Filters::Prune, :if => false do
|
||||
extend LogStash::RSpec
|
||||
|
||||
describe "defaults" do
|
||||
|
@ -174,6 +179,8 @@ describe LogStash::Filters::Prune do
|
|||
config <<-CONFIG
|
||||
filter {
|
||||
prune {
|
||||
# This should only permit fields named 'firstname', 'fullname',
|
||||
# 'location', 'status', etc.
|
||||
whitelist_values => [ "firstname", "^Borat$",
|
||||
"fullname", "%{firstname} Sagdiyev",
|
||||
"location", "no no no",
|
||||
|
@ -195,6 +202,10 @@ describe LogStash::Filters::Prune do
|
|||
"%{hmm}" => "doh"
|
||||
) do
|
||||
insist { subject["firstname"] } == "Borat"
|
||||
|
||||
# TODO(sissel): According to the config above, this should be nil because
|
||||
# it is not in the list of whitelisted fields, but we expect it to be
|
||||
# "Sagdiyev" ? I am confused.
|
||||
insist { subject["lastname"] } == "Sagdiyev"
|
||||
insist { subject["fullname"] } == nil
|
||||
insist { subject["country"] } == "Kazakhstan"
|
||||
|
@ -202,6 +213,12 @@ describe LogStash::Filters::Prune do
|
|||
insist { subject["hobby"] } == "Cloud"
|
||||
insist { subject["status"] } == "200"
|
||||
insist { subject["Borat_saying"] } == "Cloud is not ready for enterprise if is not integrate with single server running Active Directory."
|
||||
|
||||
# TODO(sissel): Contrary to the 'lastname' check, we expect %{hmm} field
|
||||
# to be nil because it is not whitelisted, yes? Contradictory insists
|
||||
# here. I don't know what the intended behavior is... Seems like
|
||||
# whitelist means 'anything not here' but since this test is written
|
||||
# confusingly, I dont' know how to move forward.
|
||||
insist { subject["%{hmm}"] } == nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue