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:
Jordan Sissel 2013-06-03 00:45:19 -07:00
parent 4a9eafbafb
commit ea4f4ddcee

View file

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