summaryrefslogtreecommitdiffstats
path: root/models/unittest/testdb.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/unittest/testdb.go')
-rw-r--r--models/unittest/testdb.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index b4f8c813af..8771bc1d21 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -18,7 +18,6 @@ import (
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
-
"xorm.io/xorm"
"xorm.io/xorm/names"
)
@@ -43,7 +42,7 @@ func fatalTestError(fmtStr string, args ...interface{}) {
// test database. Creates the test database, and sets necessary settings.
func MainTest(m *testing.M, pathToGiteaRoot string, fixtureFiles ...string) {
var err error
- InitUnitTestBridge()
+
giteaRoot = pathToGiteaRoot
fixturesDir = filepath.Join(pathToGiteaRoot, "models", "fixtures")
@@ -125,7 +124,7 @@ func CreateTestEngine(opts FixturesOptions) error {
return err
}
x.SetMapper(names.GonicMapper{})
- db.SetUnitTestEngine(x)
+ db.SetEngine(x)
if err = db.SyncAllTables(); err != nil {
return err