Chore: replace macaron with web package (#40136)

* replace macaron with web package

* add web.go
This commit is contained in:
Serge Zaitsev
2021-10-11 14:30:59 +02:00
committed by GitHub
parent 78ebac0116
commit 57fcfd578d
70 changed files with 369 additions and 375 deletions

View File

@@ -11,8 +11,8 @@ import (
"github.com/grafana/grafana/pkg/infra/localcache"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/web"
"github.com/stretchr/testify/require"
macaron "gopkg.in/macaron.v1"
)
func TestHealthAPI_Version(t *testing.T) {
@@ -167,13 +167,13 @@ func TestHealthAPI_DatabaseHealthCached(t *testing.T) {
require.True(t, healthy.(bool))
}
func setupHealthAPITestEnvironment(t *testing.T, cbs ...func(*setting.Cfg)) (*macaron.Macaron, *HTTPServer) {
func setupHealthAPITestEnvironment(t *testing.T, cbs ...func(*setting.Cfg)) (*web.Mux, *HTTPServer) {
t.Helper()
bus.ClearBusHandlers()
t.Cleanup(bus.ClearBusHandlers)
m := macaron.New()
m := web.New()
cfg := setting.NewCfg()
for _, cb := range cbs {
cb(cfg)