Skip to content

Commit

Permalink
a couple OK tests
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Jan 26, 2025
1 parent c64f257 commit 67147aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/vt/schemadiff/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,21 @@ func TestInvalidSchema(t *testing.T) {
{
schema: `create table t1 (id int primary key, CONSTRAINT const_id CHECK (id > 0))`,
},
{
schema: `create table t1 (id int primary key, CONSTRAINT const_id1 CHECK (id > 0), CONSTRAINT const_id2 CHECK (id < 10));`,
},
{
schema: `
create table t1 (id int primary key, CONSTRAINT const_id CHECK (id > 0), CONSTRAINT const_id CHECK (id < 10));
`,
expectErr: &DuplicateCheckConstraintNameError{Table: "t1", Constraint: "const_id"},
},
{
schema: `
create table t1 (id int primary key, CONSTRAINT const_id1 CHECK (id > 0));
create table t2 (id int primary key, CONSTRAINT const_id2 CHECK (id > 0));
`,
},
{
schema: `
create table t1 (id int primary key, CONSTRAINT const_id CHECK (id > 0));
Expand Down

0 comments on commit 67147aa

Please sign in to comment.