summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-10-30 22:32:11 +0800
committerGitHub <noreply@github.com>2021-10-30 22:32:11 +0800
commit63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150 (patch)
tree91da225f6e02bba47fbe5677e18d6617e43aedcd /integrations
parent76a3190b8a988e18a6b5d66dcc7324f04d83342f (diff)
downloadgitea-63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150.tar.gz
gitea-63c0dc89ef96a2e38b38aa6cba5e4e8d1d7b9150.zip
Rename db Engines related functions (#17481)
* Rename db Engines related functions Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'integrations')
-rw-r--r--integrations/migration-test/migration_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go
index 43dc2a8348..1e74fcc94d 100644
--- a/integrations/migration-test/migration_test.go
+++ b/integrations/migration-test/migration_test.go
@@ -256,13 +256,13 @@ func doMigrationTest(t *testing.T, version string) {
setting.NewXORMLogService(false)
- err := db.NewEngine(context.Background(), wrappedMigrate)
+ err := db.InitEngineWithMigration(context.Background(), wrappedMigrate)
assert.NoError(t, err)
currentEngine.Close()
beans, _ := db.NamesToBean()
- err = db.NewEngine(context.Background(), func(x *xorm.Engine) error {
+ err = db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
currentEngine = x
return migrations.RecreateTables(beans...)(x)
})
@@ -270,7 +270,7 @@ func doMigrationTest(t *testing.T, version string) {
currentEngine.Close()
// We do this a second time to ensure that there is not a problem with retained indices
- err = db.NewEngine(context.Background(), func(x *xorm.Engine) error {
+ err = db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
currentEngine = x
return migrations.RecreateTables(beans...)(x)
})