LibraryPanels: Refactor to use context.Context instead of models.ReqContext (#39561)

This commit is contained in:
Agnès Toulet
2021-09-27 09:04:36 +02:00
committed by GitHub
parent 1d1da09568
commit 57b20335e6
12 changed files with 157 additions and 163 deletions

View File

@@ -120,7 +120,7 @@ func TestGetLibraryElement(t *testing.T) {
Data: simplejson.NewFromAny(dashJSON),
}
dashInDB := createDashboard(t, sc.sqlStore, sc.user, &dash, sc.folder.Id)
err := sc.service.ConnectElementsToDashboard(sc.reqContext, []string{sc.initialResult.Result.UID}, dashInDB.Id)
err := sc.service.ConnectElementsToDashboard(sc.reqContext.Req.Context(), sc.reqContext.SignedInUser, []string{sc.initialResult.Result.UID}, dashInDB.Id)
require.NoError(t, err)
expected := func(res libraryElementResult) libraryElementResult {