Skip to content

Commit

Permalink
test: tidb exclueded
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeid Saeidee committed Aug 2, 2023
1 parent b0b7a57 commit 71e3342
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ func isTiDB() bool {
return os.Getenv("GORM_DIALECT") == "tidb"
}

func isMysql() bool {
return os.Getenv("GORM_DIALECT") == "mysql"
}

func db(unscoped bool) *gorm.DB {
if unscoped {
return DB.Unscoped()
Expand Down
2 changes: 1 addition & 1 deletion tests/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ func TestMigrateExistingBoolColumnPG(t *testing.T) {

func TestTableType(t *testing.T) {
// currently it is only supported for mysql driver
if DB.Dialector.Name() != "mysql" {
if !isMysql() {
return
}

Expand Down

0 comments on commit 71e3342

Please sign in to comment.