mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 16:32:15 +08:00
Chore: replace macaron with web package (#40136)
* replace macaron with web package * add web.go
This commit is contained in:
@ -6,20 +6,19 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/remotecache"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/auth"
|
||||
"github.com/grafana/grafana/pkg/services/contexthandler"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
type scenarioContext struct {
|
||||
t *testing.T
|
||||
m *macaron.Macaron
|
||||
m *web.Mux
|
||||
context *models.ReqContext
|
||||
resp *httptest.ResponseRecorder
|
||||
apiKey string
|
||||
@ -28,7 +27,7 @@ type scenarioContext struct {
|
||||
tokenSessionCookie string
|
||||
respJson map[string]interface{}
|
||||
handlerFunc handlerFunc
|
||||
defaultHandler macaron.Handler
|
||||
defaultHandler web.Handler
|
||||
url string
|
||||
userAuthTokenService *auth.FakeUserAuthTokenService
|
||||
jwtAuthService *models.FakeJWTService
|
||||
|
Reference in New Issue
Block a user