summaryrefslogtreecommitdiffstats
path: root/models/unit_tests.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/unit_tests.go')
-rw-r--r--models/unit_tests.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/unit_tests.go b/models/unit_tests.go
index 28cd91215e..19fc95ea65 100644
--- a/models/unit_tests.go
+++ b/models/unit_tests.go
@@ -14,6 +14,7 @@ import (
"testing"
"time"
+ "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
@@ -116,6 +117,7 @@ func PrepareTestEnv(t testing.TB) {
assert.NoError(t, removeAllWithRetry(setting.RepoRootPath))
metaPath := filepath.Join(giteaRoot, "integrations", "gitea-repositories-meta")
assert.NoError(t, com.CopyDir(metaPath, setting.RepoRootPath))
+ base.SetupGiteaRoot() // Makes sure GITEA_ROOT is set
}
type testCond struct {