Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add drntest cases for column_remove command
- Loading branch information
Showing
6 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| ] | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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
27
test/command/suite/groonga/column_remove/unknown-column.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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
16
test/command/suite/groonga/column_remove/unknown-column.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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
14
test/command/suite/groonga/column_remove/unknown-table.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| ] | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "column_remove", | ||
| "dataset": "Droonga", | ||
| "body": { | ||
| "table" : "Unknown" | ||
| } | ||
| } |