YUKI Hiroshi
null+****@clear*****
Fri Jan 31 11:43:22 JST 2014
YUKI Hiroshi 2014-01-31 11:43:22 +0900 (Fri, 31 Jan 2014) New Revision: 06552c0da03900e1a7646ae74c96384b94e12b23 https://github.com/droonga/fluent-plugin-droonga/commit/06552c0da03900e1a7646ae74c96384b94e12b23 Message: Add a test just for I/O format Modified files: test/unit/plugin/collector/test_basic.rb Modified: test/unit/plugin/collector/test_basic.rb (+33 -0) =================================================================== --- test/unit/plugin/collector/test_basic.rb 2014-01-31 11:36:31 +0900 (8fdc37f) +++ test/unit/plugin/collector/test_basic.rb 2014-01-31 11:43:22 +0900 (1f3a867) @@ -91,6 +91,39 @@ class BasicCollectorTest < Test::Unit::TestCase end class ReduceTest < self + def test_io + input_name = "input_#{Time.now.to_i}" + output_name = "output_#{Time.now.to_i}" + request = { + "task" => { + "values" => { + output_name => [0, 1, 2], + }, + "component" => { + "body" => { + input_name => { + output_name => { + "type" => "sum", + "limit" => -1, + }, + }, + }, + "outputs" => nil, + }, + }, + "id" => nil, + "value" => [3, 4, 5], + "name" => input_name, + "descendants" => nil, + } + @plugin.process("collector_reduce", request) + assert_equal([ + output_name, + [0, 1, 2, 3, 4, 5], + ], + @outputs.last) + end + data( :int => { :expected => 1.5, -------------- next part -------------- HTML����������������������������...Download