ci: run database tests against Postgres, MySQL and SQLite (#6996)

This commit is contained in:
Joe Chen
2022-06-01 22:51:46 +08:00
committed by GitHub
parent 05cdf8616b
commit 5f34265db6
14 changed files with 199 additions and 36 deletions

View File

@@ -21,6 +21,7 @@ func TestLoginSource_BeforeSave(t *testing.T) {
now := time.Now()
db := &gorm.DB{
Config: &gorm.Config{
SkipDefaultTransaction: true,
NowFunc: func() time.Time {
return now
},
@@ -54,6 +55,7 @@ func TestLoginSource_BeforeCreate(t *testing.T) {
now := time.Now()
db := &gorm.DB{
Config: &gorm.Config{
SkipDefaultTransaction: true,
NowFunc: func() time.Time {
return now
},
@@ -108,6 +110,9 @@ func Test_loginSources(t *testing.T) {
})
tc.test(t, db)
})
if t.Failed() {
break
}
}
}