Skip to content

Commit b49bb20

Browse files
author
James Cor
committed
fix tests
1 parent 914bb10 commit b49bb20

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// TODO: MOVE THESE TO SCRIPT QUERIES
2+
3+
package queries
4+
5+
var AutoIncTests = []ScriptTest{
6+
// Char tests
7+
{
8+
//Skip: true,
9+
Name: "decimal with foreign keys",
10+
Dialect: "mysql",
11+
SetUpScript: []string{
12+
"create table parent(d decimal(3,1) primary key);",
13+
"insert into parent values (1.23), (4.56), (78.9);",
14+
},
15+
Assertions: []ScriptTestAssertion{
16+
{
17+
Query: "create table bad (d decimal primary key auto_increment);",
18+
ExpectedErrStr: "Incorrect column specifier for column 'd'",
19+
},
20+
},
21+
},
22+
}

enginetest/queries/foreign_key_queries.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,11 +2740,6 @@ var CreateForeignKeyTests = []ScriptTest{
27402740
{"fk3", "mydb", "child2", "f", "mydb", "child", "d", "SET NULL", "NO ACTION"},
27412741
},
27422742
},
2743-
},
2744-
},
2745-
{
2746-
Name: "error cases",
2747-
Assertions: []ScriptTestAssertion{
27482743
{
27492744
Query: "ALTER TABLE child2 ADD CONSTRAINT fk3 FOREIGN KEY (f) REFERENCES dne(d) ON UPDATE SET NULL",
27502745
ExpectedErr: sql.ErrTableNotFound,
@@ -2947,11 +2942,6 @@ var DropForeignKeyTests = []ScriptTest{
29472942
RC.TABLE_NAME = KCU.TABLE_NAME AND RC.REFERENCED_TABLE_NAME = KCU.REFERENCED_TABLE_NAME;`,
29482943
Expected: []sql.Row{},
29492944
},
2950-
},
2951-
},
2952-
{
2953-
Name: "error cases",
2954-
Assertions: []ScriptTestAssertion{
29552945
{
29562946
Query: "ALTER TABLE child3 DROP CONSTRAINT dne",
29572947
ExpectedErr: sql.ErrTableNotFound,

0 commit comments

Comments
 (0)