mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 13:12:24 +08:00
chore: avoid aliasing models in middleware (#22484)
This commit is contained in:
@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/infra/remotecache"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/auth"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
@ -42,7 +42,7 @@ func TestRecoveryMiddleware(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func PanicHandler(c *m.ReqContext) {
|
||||
func PanicHandler(c *models.ReqContext) {
|
||||
panic("Handler has panicked")
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ func recoveryScenario(t *testing.T, desc string, url string, fn scenarioFunc) {
|
||||
// mock out gc goroutine
|
||||
sc.m.Use(OrgRedirect())
|
||||
|
||||
sc.defaultHandler = func(c *m.ReqContext) {
|
||||
sc.defaultHandler = func(c *models.ReqContext) {
|
||||
sc.context = c
|
||||
if sc.handlerFunc != nil {
|
||||
sc.handlerFunc(sc.context)
|
||||
|
Reference in New Issue
Block a user