Navigation Menu

Skip to content

Commit

Permalink
test: Add drntest cases for column_remove command
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 23, 2014
1 parent 6eb6161 commit c3878d6
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/command/suite/groonga/column_remove/success.expected
@@ -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
]
}
25 changes: 25 additions & 0 deletions test/command/suite/groonga/column_remove/success.test
@@ -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"
}
}
27 changes: 27 additions & 0 deletions test/command/suite/groonga/column_remove/unknown-column.expected
@@ -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
]
}
16 changes: 16 additions & 0 deletions test/command/suite/groonga/column_remove/unknown-column.test
@@ -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"
}
}
14 changes: 14 additions & 0 deletions test/command/suite/groonga/column_remove/unknown-table.expected
@@ -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
]
}
7 changes: 7 additions & 0 deletions test/command/suite/groonga/column_remove/unknown-table.test
@@ -0,0 +1,7 @@
{
"type": "column_remove",
"dataset": "Droonga",
"body": {
"table" : "Unknown"
}
}

0 comments on commit c3878d6

Please sign in to comment.