Navigation Menu

Skip to content

Commit

Permalink
test: Add drntest cases for Groonga's delete
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 24, 2014
1 parent fa0c840 commit d4dc081
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/command/suite/groonga/delete/duplicated-identifiers.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": "delete.result",
"body": [
[
-22,
0.0,
0.0,
""
],
false
]
}
17 changes: 17 additions & 0 deletions test/command/suite/groonga/delete/duplicated-identifiers.test
@@ -0,0 +1,17 @@
{
"type": "table_create",
"dataset": "Droonga",
"body": {
"name" : "User",
"flags" : "TABLE_PAT_KEY"
}
}
{
"type": "delete",
"dataset": "Droonga",
"body": {
"table" : "User",
"key" : "key",
"id" : 1
}
}
27 changes: 27 additions & 0 deletions test/command/suite/groonga/delete/no-identifier.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": "delete.result",
"body": [
[
-22,
0.0,
0.0,
""
],
false
]
}
15 changes: 15 additions & 0 deletions test/command/suite/groonga/delete/no-identifier.test
@@ -0,0 +1,15 @@
{
"type": "table_create",
"dataset": "Droonga",
"body": {
"name" : "User",
"flags" : "TABLE_PAT_KEY"
}
}
{
"type": "delete",
"dataset": "Droonga",
"body": {
"table" : "User"
}
}
32 changes: 32 additions & 0 deletions test/command/suite/groonga/delete/success.expected
@@ -0,0 +1,32 @@
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "table_create.result",
"body": [
[
0,
0.0,
0.0
],
true
]
}
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "add.result",
"body": true
}
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "delete.result",
"body": [
[
0,
0.0,
0.0
],
true
]
}
26 changes: 26 additions & 0 deletions test/command/suite/groonga/delete/success.test
@@ -0,0 +1,26 @@
{
"type": "table_create",
"dataset": "Droonga",
"body": {
"name" : "User",
"flags" : "TABLE_PAT_KEY"
}
}
{
"type": "add",
"dataset": "Droonga",
"body": {
"table" : "User",
"key" : "key",
"values" : {
}
}
}
{
"type": "delete",
"dataset": "Droonga",
"body": {
"table" : "User",
"key" : "key"
}
}
14 changes: 14 additions & 0 deletions test/command/suite/groonga/delete/unknown-table.expected
@@ -0,0 +1,14 @@
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "delete.result",
"body": [
[
-22,
0.0,
0.0,
"table doesn't exist: <Unknown>"
],
false
]
}
7 changes: 7 additions & 0 deletions test/command/suite/groonga/delete/unknown-table.test
@@ -0,0 +1,7 @@
{
"type": "delete",
"dataset": "Droonga",
"body": {
"table" : "Unknown"
}
}

0 comments on commit d4dc081

Please sign in to comment.