Permalink
Browse files

Omit test when `Fluent::Filter` is not defined

This is for fluentd v0.10.x
  • Loading branch information...
okkez committed Jan 27, 2016
1 parent 911a2ae commit b48c3827c225a713ef0ec9b9e5112ded2a5e3f5b
Showing with 5 additions and 1 deletion.
  1. +4 −1 test/helper.rb
  2. +1 −0 test/plugin/test_filter_anonymizer.rb
View
@@ -23,7 +23,10 @@ def method_missing(method, *args)
end
require 'fluent/plugin/out_anonymizer'
-require 'fluent/plugin/filter_anonymizer'
+if Fluent.const_defined?(:Filter)
+ require 'fluent/plugin/filter_anonymizer'
+end
+
class Test::Unit::TestCase
end
@@ -2,6 +2,7 @@
class AnonymizerFilterTest < Test::Unit::TestCase
def setup
+ omit_unless(Fluent.const_defined?(:Filter))
Fluent::Test.setup
@time = Fluent::Engine.now
end

0 comments on commit b48c382

Please sign in to comment.