aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/migration-test
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-09-15 19:44:52 +0100
committerGitHub <noreply@github.com>2020-09-15 19:44:52 +0100
commit0d14c2fb93491ddc121d8616e7ae2edbe6290ae4 (patch)
treecdef9d6668755763c757e80e1ea78ccd11c74050 /integrations/migration-test
parent81ed47c29d371c9326d7fc7eef456cadd0bd8435 (diff)
downloadgitea-0d14c2fb93491ddc121d8616e7ae2edbe6290ae4.tar.gz
gitea-0d14c2fb93491ddc121d8616e7ae2edbe6290ae4.zip
Don't keep running SetEngine in migration_test (#12860)
There's no need to keep repeatedly running SetEngine in migration_test, as NewEngine calls it anyway. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'integrations/migration-test')
-rw-r--r--integrations/migration-test/migration_test.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go
index 940e4738ad..22d74054c4 100644
--- a/integrations/migration-test/migration_test.go
+++ b/integrations/migration-test/migration_test.go
@@ -252,16 +252,11 @@ func doMigrationTest(t *testing.T, version string) {
}
setting.NewXORMLogService(false)
- err := models.SetEngine()
- assert.NoError(t, err)
- err = models.NewEngine(context.Background(), wrappedMigrate)
+ err := models.NewEngine(context.Background(), wrappedMigrate)
assert.NoError(t, err)
currentEngine.Close()
- err = models.SetEngine()
- assert.NoError(t, err)
-
beans, _ := models.NamesToBean()
err = models.NewEngine(context.Background(), func(x *xorm.Engine) error {
@@ -272,9 +267,6 @@ 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 = models.SetEngine()
- assert.NoError(t, err)
-
err = models.NewEngine(context.Background(), func(x *xorm.Engine) error {
currentEngine = x
return migrations.RecreateTables(beans...)(x)