mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 10:19:54 +02:00
Decouple unit test, remove intermediate unittestbridge package (#17662)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
1 parent
23bd7b1211
commit
81926d61db
151 files changed
+1719
-1781
No files matched your search
@@ -153,6 +153,15 @@ func InitEngine(ctx context.Context) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetEngine is used by unit test code
|
||||
func SetEngine(eng *xorm.Engine) {
|
||||
x = eng
|
||||
DefaultContext = &Context{
|
||||
Context: context.Background(),
|
||||
e: x,
|
||||
}
|
||||
}
|
||||
|
||||
// InitEngineWithMigration initializes a new xorm.Engine
|
||||
// This function must never call .Sync2() if the provided migration function fails.
|
||||
// When called from the "doctor" command, the migration function is a version check
|
||||
|
||||
Reference in new issue
Block a user