Skip to content

Commit

Permalink
test: enabled mysql for ErrForeignKeyViolated
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeid Saeidee committed Jun 13, 2023
1 parent c1ac068 commit f6db161
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/error_translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestSupportedDialectorWithErrForeignKeyViolated(t *testing.T) {
t.Fatalf("failed to connect database, got error %v", err)
}

dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": false, "sqlserver": false}
dialectors := map[string]bool{"sqlite": true, "postgres": true, "mysql": true, "sqlserver": false}
if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) {
return
}
Expand Down
3 changes: 1 addition & 2 deletions tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ require (
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jinzhu/now v1.1.5
github.com/lib/pq v1.10.9
github.com/mattn/go-sqlite3 v1.14.16 // indirect
gorm.io/driver/mysql v1.5.0
gorm.io/driver/mysql v1.5.2-0.20230612053416-48b6526a21f0
gorm.io/driver/postgres v1.5.3-0.20230607070428-18bc84b75196
gorm.io/driver/sqlite v1.5.2
gorm.io/driver/sqlserver v1.5.1
Expand Down

0 comments on commit f6db161

Please sign in to comment.