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.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index 8771bc1d21..94c93755e0 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -5,6 +5,7 @@
package unittest
import (
+ "context"
"fmt"
"net/url"
"os"
@@ -124,7 +125,7 @@ func CreateTestEngine(opts FixturesOptions) error {
return err
}
x.SetMapper(names.GonicMapper{})
- db.SetEngine(x)
+ db.SetDefaultEngine(context.Background(), x)
if err = db.SyncAllTables(); err != nil {
return err