aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/migration-test/migration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/migration-test/migration_test.go')
-rw-r--r--integrations/migration-test/migration_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go
index 4ee045db38..976a59a579 100644
--- a/integrations/migration-test/migration_test.go
+++ b/integrations/migration-test/migration_test.go
@@ -24,6 +24,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/charset"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
"github.com/unknwon/com"
@@ -58,7 +59,7 @@ func initMigrationTest(t *testing.T) func() {
setting.NewContext()
assert.True(t, len(setting.RepoRootPath) != 0)
- assert.NoError(t, os.RemoveAll(setting.RepoRootPath))
+ assert.NoError(t, util.RemoveAll(setting.RepoRootPath))
assert.NoError(t, com.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
setting.CheckLFSVersion()
@@ -129,7 +130,7 @@ func restoreOldDB(t *testing.T, version string) bool {
switch {
case setting.Database.UseSQLite3:
- os.Remove(setting.Database.Path)
+ util.Remove(setting.Database.Path)
err := os.MkdirAll(path.Dir(setting.Database.Path), os.ModePerm)
assert.NoError(t, err)