1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-13 14:07:20 +00:00

Refactor tests (#26464)

1. Give the global variable clear names
2. Use generic parameter for `onGiteaRun`
This commit is contained in:
wxiaoguang
2023-08-13 00:30:16 +08:00
committed by GitHub
parent bcccf4c0d6
commit c28e29fd94
12 changed files with 65 additions and 127 deletions

View File

@ -181,7 +181,7 @@ func InitTest(requireGitea bool) {
func PrepareTestEnv(t testing.TB, skip ...int) func() {
t.Helper()
ourSkip := 2
ourSkip := 1
if len(skip) > 0 {
ourSkip += skip[0]
}