chore: avoid aliasing models in middleware (#22484)

This commit is contained in:
Carl Bergquist
2020-02-28 12:50:58 +01:00
committed by GitHub
parent 8b9b67f248
commit f2f2722bb1
15 changed files with 74 additions and 74 deletions

View File

@ -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)