Kouhei Sutou
null+****@clear*****
Thu Mar 20 00:27:57 JST 2014
Kouhei Sutou 2014-03-20 00:27:57 +0900 (Thu, 20 Mar 2014) New Revision: 003be7a0eae6f648065a11df26a80e55a73b4226 https://github.com/droonga/fluent-plugin-droonga/commit/003be7a0eae6f648065a11df26a80e55a73b4226 Message: Add a test for custom dimension Added files: test/command/suite/add/dimension/column.catalog.json test/command/suite/add/dimension/column.expected test/command/suite/add/dimension/column.test Added: test/command/suite/add/dimension/column.catalog.json (+27 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/add/dimension/column.catalog.json 2014-03-20 00:27:57 +0900 (86dc165) @@ -0,0 +1,27 @@ +{ + "datasets": { + "Droonga": { + "schema": { + "Products": { + "type": "Hash", + "keyType": "ShortText", + "columns": { + "category": { + "type": "Scalar", + "valueType": "ShortText" + } + } + } + }, + "replicas": [ + { + "dimension": "category" + }, + { + "dimension": "category" + } + ] + } + } +} + Added: test/command/suite/add/dimension/column.expected (+57 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/add/dimension/column.expected 2014-03-20 00:27:57 +0900 (8687af9) @@ -0,0 +1,57 @@ +[ + "droonga.message", + 0, + { + "inReplyTo": "request-id", + "statusCode": 200, + "type": "add.result", + "body": true + } +] +[ + "droonga.message", + 0, + { + "inReplyTo": "request-id", + "statusCode": 200, + "type": "add.result", + "body": true + } +] +[ + "droonga.message", + 0, + { + "inReplyTo": "request-id", + "statusCode": 200, + "type": "add.result", + "body": true + } +] +[ + "droonga.message", + 0, + { + "inReplyTo": "request-id", + "statusCode": 200, + "type": "search.result", + "body": { + "products": { + "records": [ + [ + "Groonga", + "groonga" + ], + [ + "Rroonga", + "groonga" + ], + [ + "Ruby", + "ruby" + ] + ] + } + } + } +] Added: test/command/suite/add/dimension/column.test (+50 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/add/dimension/column.test 2014-03-20 00:27:57 +0900 (6f10dd9) @@ -0,0 +1,50 @@ +{ + "type": "add", + "dataset": "Droonga", + "body": { + "table": "Products", + "key": "Groonga", + "values": { + "category": "groonga" + } + } +} +{ + "type": "add", + "dataset": "Droonga", + "body": { + "table": "Products", + "key": "Rroonga", + "values": { + "category": "groonga" + } + } +} +{ + "type": "add", + "dataset": "Droonga", + "body": { + "table": "Products", + "key": "Ruby", + "values": { + "category": "ruby" + } + } +} +{ + "type": "search", + "dataset": "Droonga", + "body": { + "queries": { + "products": { + "source": "Products", + "sortBy": ["_key"], + "output": { + "elements": ["records"], + "attributes": ["_key", "category"], + "limit": -1 + } + } + } + } +} -------------- next part -------------- HTML����������������������������...ダウンロード