diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-06-20 01:48:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 07:48:17 +0800 |
commit | 02d745827bdbe01a82f9f069a904f53197252685 (patch) | |
tree | 76fafa40fe638203ea618122a033f04738301da1 /integrations/api_nodeinfo_test.go | |
parent | e91229eefbd09fecaebd0e058c3bfe7612a0bc61 (diff) | |
download | gitea-02d745827bdbe01a82f9f069a904f53197252685.tar.gz gitea-02d745827bdbe01a82f9f069a904f53197252685.zip |
Disable federation by default (#20045)
Diffstat (limited to 'integrations/api_nodeinfo_test.go')
-rw-r--r-- | integrations/api_nodeinfo_test.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/integrations/api_nodeinfo_test.go b/integrations/api_nodeinfo_test.go index c2fcd2fea5..cf9ff4da1b 100644 --- a/integrations/api_nodeinfo_test.go +++ b/integrations/api_nodeinfo_test.go @@ -11,17 +11,20 @@ import ( "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) { - onGiteaRun(t, func(*testing.T, *url.URL) { - setting.Federation.Enabled = true - defer func() { - setting.Federation.Enabled = false - }() + setting.Federation.Enabled = true + c = routers.NormalRoutes() + defer func() { + setting.Federation.Enabled = false + c = routers.NormalRoutes() + }() + onGiteaRun(t, func(*testing.T, *url.URL) { req := NewRequestf(t, "GET", "/api/v1/nodeinfo") resp := MakeRequest(t, req, http.StatusOK) var nodeinfo api.NodeInfo |