test: enabled mysql& mssql for ErrForeignKeyViolate
This commit is contained in:
parent
c1ac0682fb
commit
adcbf9f68b
@ -77,7 +77,7 @@ func TestSupportedDialectorWithErrForeignKeyViolated(t *testing.T) {
|
|||||||
t.Fatalf("failed to connect database, got error %v", err)
|
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": true}
|
||||||
if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) {
|
if supported, found := dialectors[db.Dialector.Name()]; !(found && supported) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,7 @@ require (
|
|||||||
github.com/jackc/pgx/v5 v5.3.1 // indirect
|
github.com/jackc/pgx/v5 v5.3.1 // indirect
|
||||||
github.com/jinzhu/now v1.1.5
|
github.com/jinzhu/now v1.1.5
|
||||||
github.com/lib/pq v1.10.9
|
github.com/lib/pq v1.10.9
|
||||||
github.com/mattn/go-sqlite3 v1.14.16 // indirect
|
gorm.io/driver/mysql v1.5.2-0.20230612053416-48b6526a21f0
|
||||||
gorm.io/driver/mysql v1.5.0
|
|
||||||
gorm.io/driver/postgres v1.5.3-0.20230607070428-18bc84b75196
|
gorm.io/driver/postgres v1.5.3-0.20230607070428-18bc84b75196
|
||||||
gorm.io/driver/sqlite v1.5.2
|
gorm.io/driver/sqlite v1.5.2
|
||||||
gorm.io/driver/sqlserver v1.5.1
|
gorm.io/driver/sqlserver v1.5.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user