浏览代码

Windows compatibility for unit tests (#800)

tags/v1.1.0
Ethan Koenig 7 年前
父节点
当前提交
0a02fb3c4f
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3
    2
      models/setup_for_test.go

+ 3
- 2
models/setup_for_test.go 查看文件

@@ -7,6 +7,7 @@ package models
import (
"fmt"
"os"
"path/filepath"
"testing"

"code.gitea.io/gitea/modules/setting"
@@ -30,8 +31,8 @@ func TestMain(m *testing.M) {
setting.RunUser = "runuser"
setting.SSH.Port = 3000
setting.SSH.Domain = "try.gitea.io"
setting.RepoRootPath = "/tmp/repos"
setting.AppDataPath = "/tmp/appdata"
setting.RepoRootPath = filepath.Join(os.TempDir(), "repos")
setting.AppDataPath = filepath.Join(os.TempDir(), "appdata")

os.Exit(m.Run())
}

正在加载...
取消
保存