mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
pkg/web: remove Router and Logger from Context (#53765)
web.Context previously held references to the current *web.Router albeit not using it. It also had a log.Logger only being used once internally
This commit is contained in:
@@ -41,8 +41,7 @@ func TestToMacaronPath(t *testing.T) {
|
||||
func TestAlertingProxy_createProxyContext(t *testing.T) {
|
||||
ctx := &models.ReqContext{
|
||||
Context: &web.Context{
|
||||
Router: web.NewRouter(),
|
||||
Req: &http.Request{},
|
||||
Req: &http.Request{},
|
||||
},
|
||||
SignedInUser: &user.SignedInUser{},
|
||||
UserToken: &models.UserToken{},
|
||||
@@ -92,7 +91,6 @@ func TestAlertingProxy_createProxyContext(t *testing.T) {
|
||||
newCtx := proxy.createProxyContext(ctx, req, resp)
|
||||
|
||||
require.NotEqual(t, ctx.Context.Resp, newCtx.Context.Resp)
|
||||
require.Equal(t, ctx.Context.Router, newCtx.Context.Router)
|
||||
require.Equal(t, ctx.Context.Req, newCtx.Context.Req)
|
||||
|
||||
require.NotEqual(t, 123, resp.Status())
|
||||
|
||||
Reference in New Issue
Block a user