[Groonga-commit] droonga/droonga-engine at c3878d6 [master] test: Add drntest cases for column_remove command

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Apr 23 11:29:07 JST 2014


YUKI Hiroshi	2014-04-23 11:29:07 +0900 (Wed, 23 Apr 2014)

  New Revision: c3878d6d7727699a1786c368f54303b582827fd7
  https://github.com/droonga/droonga-engine/commit/c3878d6d7727699a1786c368f54303b582827fd7

  Message:
    test: Add drntest cases for column_remove command

  Added files:
    test/command/suite/groonga/column_remove/success.expected
    test/command/suite/groonga/column_remove/success.test
    test/command/suite/groonga/column_remove/unknown-column.expected
    test/command/suite/groonga/column_remove/unknown-column.test
    test/command/suite/groonga/column_remove/unknown-table.expected
    test/command/suite/groonga/column_remove/unknown-table.test

  Added: test/command/suite/groonga/column_remove/success.expected (+39 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/groonga/column_remove/success.expected    2014-04-23 11:29:07 +0900 (7b00c83)
@@ -0,0 +1,39 @@
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "table_create.result",
+  "body": [
+    [
+      0,
+      0.0,
+      0.0
+    ],
+    true
+  ]
+}
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "column_create.result",
+  "body": [
+    [
+      0,
+      0.0,
+      0.0
+    ],
+    true
+  ]
+}
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "column_remove.result",
+  "body": [
+    [
+      0,
+      0.0,
+      0.0
+    ],
+    true
+  ]
+}

  Added: test/command/suite/groonga/column_remove/success.test (+25 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/groonga/column_remove/success.test    2014-04-23 11:29:07 +0900 (ebe311c)
@@ -0,0 +1,25 @@
+{
+  "type": "table_create",
+  "dataset": "Droonga",
+  "body": {
+    "name"  : "User",
+    "flags" : "TABLE_PAT_KEY"
+  }
+}
+{
+  "type": "column_create",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "User",
+    "name"  : "age",
+    "type"  : "Int32"
+  }
+}
+{
+  "type": "column_remove",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "User",
+    "name"  : "age"
+  }
+}

  Added: test/command/suite/groonga/column_remove/unknown-column.expected (+27 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/groonga/column_remove/unknown-column.expected    2014-04-23 11:29:07 +0900 (af8e31e)
@@ -0,0 +1,27 @@
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "table_create.result",
+  "body": [
+    [
+      0,
+      0.0,
+      0.0
+    ],
+    true
+  ]
+}
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "column_remove.result",
+  "body": [
+    [
+      -22,
+      0.0,
+      0.0,
+      "column doesn't exist: <unknown>"
+    ],
+    false
+  ]
+}

  Added: test/command/suite/groonga/column_remove/unknown-column.test (+16 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/groonga/column_remove/unknown-column.test    2014-04-23 11:29:07 +0900 (5b6bdab)
@@ -0,0 +1,16 @@
+{
+  "type": "table_create",
+  "dataset": "Droonga",
+  "body": {
+    "name"  : "User",
+    "flags" : "TABLE_PAT_KEY"
+  }
+}
+{
+  "type": "column_remove",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "User",
+    "name"  : "unknown"
+  }
+}

  Added: test/command/suite/groonga/column_remove/unknown-table.expected (+14 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/groonga/column_remove/unknown-table.expected    2014-04-23 11:29:07 +0900 (d84d0d5)
@@ -0,0 +1,14 @@
+{
+  "inReplyTo": "request-id",
+  "statusCode": 200,
+  "type": "column_remove.result",
+  "body": [
+    [
+      -22,
+      0.0,
+      0.0,
+      "table doesn't exist: <Unknown>"
+    ],
+    false
+  ]
+}

  Added: test/command/suite/groonga/column_remove/unknown-table.test (+7 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/groonga/column_remove/unknown-table.test    2014-04-23 11:29:07 +0900 (e1d78e8)
@@ -0,0 +1,7 @@
+{
+  "type": "column_remove",
+  "dataset": "Droonga",
+  "body": {
+    "table" : "Unknown"
+  }
+}
-------------- next part --------------
HTML����������������������������...
Download 



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