From 3078ecdb2761c305c4843b70cc511fdcaccfabb7 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 18 May 2020 08:52:50 +0800 Subject: [PATCH] fix test --- models/unit_tests.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/unit_tests.go b/models/unit_tests.go index 1b27eebcd..cbb10e383 100644 --- a/models/unit_tests.go +++ b/models/unit_tests.go @@ -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) }