Browse Source

fix test

tags/v1.21.12.1
Lunny Xiao yan 6 years ago
parent
commit
3078ecdb27
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      models/unit_tests.go

+ 5
- 0
models/unit_tests.go View File

@@ -16,6 +16,7 @@ import (

"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/storage"

"github.com/stretchr/testify/assert"
"github.com/unknwon/com"
@@ -68,6 +69,10 @@ func MainTest(m *testing.M, pathToGiteaRoot string) {
fatalTestError("url.Parse: %v\n", err)
}

if err = storage.Init(); err != nil {
fatalTestError("storage.Init: %v\n", err)
}

if err = removeAllWithRetry(setting.RepoRootPath); err != nil {
fatalTestError("os.RemoveAll: %v\n", err)
}


Loading…
Cancel
Save