We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2eb15f4 commit 0a02fb3Copy full SHA for 0a02fb3
models/setup_for_test.go
@@ -7,6 +7,7 @@ package models
7
import (
8
"fmt"
9
"os"
10
+ "path/filepath"
11
"testing"
12
13
"code.gitea.io/gitea/modules/setting"
@@ -30,8 +31,8 @@ func TestMain(m *testing.M) {
30
31
setting.RunUser = "runuser"
32
setting.SSH.Port = 3000
33
setting.SSH.Domain = "try.gitea.io"
- setting.RepoRootPath = "/tmp/repos"
34
- setting.AppDataPath = "/tmp/appdata"
+ setting.RepoRootPath = filepath.Join(os.TempDir(), "repos")
35
+ setting.AppDataPath = filepath.Join(os.TempDir(), "appdata")
36
37
os.Exit(m.Run())
38
}
0 commit comments