Chore: replace macaron with web package (#40136)
* replace macaron with web package * add web.go
This commit is contained in:
@@ -12,14 +12,13 @@ import (
|
||||
dboards "github.com/grafana/grafana/pkg/dashboards"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/macaron.v1"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api/response"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/services/dashboards"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const userInDbName = "user_in_db"
|
||||
@@ -163,7 +162,7 @@ func getCreateCommandWithModel(folderID int64, name string, kind models.LibraryE
|
||||
}
|
||||
|
||||
type scenarioContext struct {
|
||||
ctx *macaron.Context
|
||||
ctx *web.Context
|
||||
service *LibraryElementService
|
||||
reqContext *models.ReqContext
|
||||
user models.SignedInUser
|
||||
@@ -280,7 +279,7 @@ func testScenario(t *testing.T, desc string, fn func(t *testing.T, sc scenarioCo
|
||||
t.Helper()
|
||||
|
||||
t.Run(desc, func(t *testing.T) {
|
||||
ctx := macaron.Context{Req: &http.Request{}}
|
||||
ctx := web.Context{Req: &http.Request{}}
|
||||
orgID := int64(1)
|
||||
role := models.ROLE_ADMIN
|
||||
sqlStore := sqlstore.InitTestDB(t)
|
||||
|
||||
Reference in New Issue
Block a user