mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: replace macaron with web package (#40136)
* replace macaron with web package * add web.go
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/macaron.v1"
|
||||
)
|
||||
|
||||
type execFunc func() *httptest.ResponseRecorder
|
||||
@@ -31,8 +31,8 @@ func rateLimiterScenario(t *testing.T, desc string, rps int, burst int, fn rateL
|
||||
|
||||
cfg := setting.NewCfg()
|
||||
|
||||
m := macaron.New()
|
||||
m.UseMiddleware(macaron.Renderer("../../public/views", "[[", "]]"))
|
||||
m := web.New()
|
||||
m.UseMiddleware(web.Renderer("../../public/views", "[[", "]]"))
|
||||
m.Use(getContextHandler(t, cfg).Middleware)
|
||||
m.Get("/foo", RateLimit(rps, burst, func() time.Time { return currentTime }), defaultHandler)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user