Remove sql tests for CIPHERKEY

This commit is contained in:
Tobie Morgan Hitchcock 2016-07-21 22:43:52 +01:00
parent 900ae308d4
commit f57e042aa4
2 changed files with 1 additions and 39 deletions

View file

@ -159,7 +159,7 @@ func Test_Parse_Queries_Use(t *testing.T) {
var tests = []tester{ var tests = []tester{
{ {
sql: `USE`, sql: `USE`,
err: "Found `` but expected `NAMESPACE, DATABASE, CIPHERKEY`", err: "Found `` but expected `NAMESPACE, DATABASE`",
}, },
{ {
sql: `USE NAMESPACE`, sql: `USE NAMESPACE`,
@ -241,42 +241,6 @@ func Test_Parse_Queries_Use(t *testing.T) {
DB: "", DB: "",
}}}, }}},
}, },
{
sql: `USE CIPHERKEY`,
err: "Found `` but expected `16, 24, or 32 bit cipher key`",
},
{
sql: `USE CIPHERKEY 1hg7dbrma8ghe5473kghvie64jgi3ph4`,
res: &Query{Statements: []Statement{&UseStatement{
CK: "1hg7dbrma8ghe5473kghvie64jgi3ph4",
}}},
},
{
sql: `USE CIPHERKEY "1hg7dbrma8ghe5473kghvie64jgi3ph4"`,
res: &Query{Statements: []Statement{&UseStatement{
CK: "1hg7dbrma8ghe5473kghvie64jgi3ph4",
}}},
},
{
sql: `USE CIPHERKEY 1`,
err: "Found `1` but expected `16, 24, or 32 bit cipher key`",
},
{
sql: `USE CIPHERKEY 1.3000`,
err: "Found `1.3000` but expected `16, 24, or 32 bit cipher key`",
},
{
sql: `USE CIPHERKEY 123.123.123.123`,
err: "Found `123.123.123.123` but expected `16, 24, or 32 bit cipher key`",
},
{
sql: `USE CIPHERKEY {"some":"thing"}`,
err: "Found `{\"some\":\"thing\"}` but expected `16, 24, or 32 bit cipher key`",
},
{
sql: `USE CIPHERKEY name something`,
err: "Found `name` but expected `16, 24, or 32 bit cipher key`",
},
} }
for _, test := range tests { for _, test := range tests {

View file

@ -96,7 +96,6 @@ const (
BEFORE BEFORE
BOTH BOTH
BY BY
CIPHERKEY
CODE CODE
COLUMNS COLUMNS
CONTENT CONTENT
@ -226,7 +225,6 @@ var tokens = [...]string{
BEFORE: "BEFORE", BEFORE: "BEFORE",
BOTH: "BOTH", BOTH: "BOTH",
BY: "BY", BY: "BY",
CIPHERKEY: "CIPHERKEY",
CODE: "CODE", CODE: "CODE",
COLUMNS: "COLUMNS", COLUMNS: "COLUMNS",
CONTENT: "CONTENT", CONTENT: "CONTENT",