mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 04:31:52 +02:00
Refactor tests (#26464)
1. Give the global variable clear names 2. Use generic parameter for `onGiteaRun`
This commit is contained in:
1 parent
bcccf4c0d6
commit
c28e29fd94
12 files changed
+65
-127
No files matched your search
@@ -17,10 +17,10 @@ import (
|
||||
|
||||
func TestNodeinfo(t *testing.T) {
|
||||
setting.Federation.Enabled = true
|
||||
c = routers.NormalRoutes()
|
||||
testWebRoutes = routers.NormalRoutes()
|
||||
defer func() {
|
||||
setting.Federation.Enabled = false
|
||||
c = routers.NormalRoutes()
|
||||
testWebRoutes = routers.NormalRoutes()
|
||||
}()
|
||||
|
||||
onGiteaRun(t, func(*testing.T, *url.URL) {
|
||||
|
||||
Reference in new issue
Block a user