mirror of
https://github.com/gogs/gogs.git
synced 2025-12-22 16:20:14 +01:00
ci: run database tests against Postgres, MySQL and SQLite (#6996)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user