mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor tests (#26464)
1. Give the global variable clear names 2. Use generic parameter for `onGiteaRun`
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
"code.gitea.io/gitea/tests"
|
||||
)
|
||||
|
||||
var c *web.Route
|
||||
var testE2eWebRoutes *web.Route
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
defer log.GetManager().Close()
|
||||
@@ -38,7 +38,7 @@ func TestMain(m *testing.M) {
|
||||
defer cancel()
|
||||
|
||||
tests.InitTest(false)
|
||||
c = routers.NormalRoutes()
|
||||
testE2eWebRoutes = routers.NormalRoutes()
|
||||
|
||||
os.Unsetenv("GIT_AUTHOR_NAME")
|
||||
os.Unsetenv("GIT_AUTHOR_EMAIL")
|
||||
|
Reference in New Issue
Block a user