YUKI Hiroshi
null+****@clear*****
Thu Dec 26 14:52:03 JST 2013
YUKI Hiroshi 2013-12-26 14:52:03 +0900 (Thu, 26 Dec 2013) New Revision: a907741b6a60c9563c2e35587cbb522a4bbf2c2a https://github.com/droonga/fluent-plugin-droonga/commit/a907741b6a60c9563c2e35587cbb522a4bbf2c2a Message: Don't test missing "type" case Because it is completely unknown so we don't know it should be or should not be return a response! Removed files: test/command/suite/common-error/missing-type.expected test/command/suite/common-error/missing-type.test Modified files: lib/droonga/dispatcher.rb lib/fluent/plugin/out_droonga.rb Modified: lib/droonga/dispatcher.rb (+0 -7) =================================================================== --- lib/droonga/dispatcher.rb 2013-12-26 14:40:54 +0900 (0c1bc75) +++ lib/droonga/dispatcher.rb 2013-12-26 14:52:03 +0900 (0131e9c) @@ -35,12 +35,6 @@ module Droonga class InvalidRequest < ResponsibleClientError end - class MissingType < InvalidRequest - def initialize - super("\"type\" must be specified.") - end - end - class MissingDataset < InvalidRequest def initialize super("\"dataset\" must be specified.") @@ -204,7 +198,6 @@ module Droonga end def assert_valid_message - raise MissingType.new unles****@messa*****?("type") raise MissingDataset.new unles****@messa*****?("dataset") end Modified: lib/fluent/plugin/out_droonga.rb (+1 -1) =================================================================== --- lib/fluent/plugin/out_droonga.rb 2013-12-26 14:40:54 +0900 (f4b30b0) +++ lib/fluent/plugin/out_droonga.rb 2013-12-26 14:52:03 +0900 (156e392) @@ -64,7 +64,7 @@ module Fluent reply_to = message["replyTo"] if reply_to.is_a? String message["replyTo"] = { - "type" => "#{message["type"] || ""}.result", + "type" => "#{message["type"]}.result", "to" => reply_to } end Deleted: test/command/suite/common-error/missing-type.expected (+0 -13) 100644 =================================================================== --- test/command/suite/common-error/missing-type.expected 2013-12-26 14:40:54 +0900 (42d80f5) +++ /dev/null @@ -1,13 +0,0 @@ -[ - "droonga.message", - 0, - { - "inReplyTo": null, - "statusCode": 400, - "type": ".result", - "body": { - "name": "MissingType", - "message": "\"type\" must be specified." - } - } -] Deleted: test/command/suite/common-error/missing-type.test (+0 -16) 100644 =================================================================== --- test/command/suite/common-error/missing-type.test 2013-12-26 14:40:54 +0900 (aeb6901) +++ /dev/null @@ -1,16 +0,0 @@ -#@include fixture/user-table.jsons -{ - "dataset": "Droonga", - "body": { - "table": "User", - "key": "key", - "values": { - "name": "Alice", - "age": 20, - "email": [ - "alice �� example.com", - "alice �� example.jp" - ] - } - } -} -------------- next part -------------- HTML����������������������������...下載