[Groonga-commit] droonga/fluent-plugin-droonga at 9817e3a [master] Add test for "add" without key

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Nov 28 20:45:25 JST 2013


YUKI Hiroshi	2013-11-28 20:45:25 +0900 (Thu, 28 Nov 2013)

  New Revision: 9817e3a7d448c2af3a81c623252bce9f6eaac2f7
  https://github.com/droonga/fluent-plugin-droonga/commit/9817e3a7d448c2af3a81c623252bce9f6eaac2f7

  Message:
    Add test for "add" without key

  Added files:
    test/command/fixture/user-table-array.jsons
    test/command/suite/add/without-key.expected
    test/command/suite/add/without-key.test

  Added: test/command/fixture/user-table-array.jsons (+38 -0) 100644
===================================================================
--- /dev/null
+++ test/command/fixture/user-table-array.jsons    2013-11-28 20:45:25 +0900 (d17ebcf)
@@ -0,0 +1,38 @@
+#@disable-logging
+{
+  "type": "table_create",
+  "dataset": "Droonga",
+  "body": {
+    "name"  : "User",
+    "flags" : "TABLE_NO_KEY"
+  }
+}
+{
+  "type": "column_create",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "User",
+    "name"  : "name",
+    "type"  : "ShortText"
+  }
+}
+{
+  "type": "column_create",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "User",
+    "name"  : "age",
+    "type"  : "Int32"
+  }
+}
+{
+  "type": "column_create",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "User",
+    "name"  : "email",
+    "type"  : "ShortText",
+    "flags" : "COLUMN_VECTOR"
+  }
+}
+#@enable-logging

  Added: test/command/suite/add/without-key.expected (+12 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/add/without-key.expected    2013-11-28 20:45:25 +0900 (3216089)
@@ -0,0 +1,12 @@
+[
+  "droonga.message",
+  0,
+  {
+    "inReplyTo": null,
+    "statusCode": 200,
+    "type": "add.result",
+    "body": [
+      true
+    ]
+  }
+]

  Added: test/command/suite/add/without-key.test (+16 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/add/without-key.test    2013-11-28 20:45:25 +0900 (98c297f)
@@ -0,0 +1,16 @@
+#@include fixture/user-table-array.jsons
+{
+  "type": "add",
+  "dataset": "Droonga",
+  "body": {
+    "table": "User",
+    "values": {
+      "name": "Alice",
+      "age": 20,
+      "email": [
+        "alice �� example.com",
+        "alice �� example.jp"
+      ]
+    }
+  }
+}
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index