test: tidb exclueded
This commit is contained in:
parent
b0b7a57b9f
commit
71e3342b6d
@ -265,6 +265,10 @@ func isTiDB() bool {
|
|||||||
return os.Getenv("GORM_DIALECT") == "tidb"
|
return os.Getenv("GORM_DIALECT") == "tidb"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isMysql() bool {
|
||||||
|
return os.Getenv("GORM_DIALECT") == "mysql"
|
||||||
|
}
|
||||||
|
|
||||||
func db(unscoped bool) *gorm.DB {
|
func db(unscoped bool) *gorm.DB {
|
||||||
if unscoped {
|
if unscoped {
|
||||||
return DB.Unscoped()
|
return DB.Unscoped()
|
||||||
|
@ -1601,7 +1601,7 @@ func TestMigrateExistingBoolColumnPG(t *testing.T) {
|
|||||||
|
|
||||||
func TestTableType(t *testing.T) {
|
func TestTableType(t *testing.T) {
|
||||||
// currently it is only supported for mysql driver
|
// currently it is only supported for mysql driver
|
||||||
if DB.Dialector.Name() != "mysql" {
|
if !isMysql() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user