forked from forgejo/forgejo
[TESTS] testMiddlewareHook, dependency injection in integration tests
(cherry picked from commit6623630d10
) (cherry picked from commit5e30a4f950
) (cherry picked from commit355a117e74
) (cherry picked from commit2e98ceccbc
) (cherry picked from commite1687f1e20
)
This commit is contained in:
parent
cf7c08031f
commit
2b97800dd8
6 changed files with 32 additions and 18 deletions
|
@ -4,24 +4,22 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/routers"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNodeinfo(t *testing.T) {
|
||||
setting.Federation.Enabled = true
|
||||
c = routers.NormalRoutes(context.TODO())
|
||||
setNormalRoutes()
|
||||
defer func() {
|
||||
setting.Federation.Enabled = false
|
||||
c = routers.NormalRoutes(context.TODO())
|
||||
setNormalRoutes()
|
||||
}()
|
||||
|
||||
onGiteaRun(t, func(*testing.T, *url.URL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue