Skip to content

Commit

Permalink
Move validation testcases for op_create_constraint to a separate te…
Browse files Browse the repository at this point in the history
…st (#494)

Move the tests for validation of the `op_create_constraint` operation to
their own test for consistency with how validation for other operations
is tested.
  • Loading branch information
andrew-farries authored Nov 26, 2024
1 parent 86e02c5 commit b03cef2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/migrations/op_create_constraint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
func TestCreateConstraint(t *testing.T) {
t.Parallel()

invalidName := strings.Repeat("x", 64)
ExecuteTests(t, TestCases{
{
name: "create unique constraint on single column",
Expand Down Expand Up @@ -496,6 +495,14 @@ func TestCreateConstraint(t *testing.T) {
}, rows)
},
},
})
}

func TestCreateConstraintValidation(t *testing.T) {
t.Parallel()

invalidName := strings.Repeat("x", 64)
ExecuteTests(t, TestCases{
{
name: "invalid constraint name",
migrations: []migrations.Migration{
Expand Down

0 comments on commit b03cef2

Please sign in to comment.