Chore: Propagate context for data source provisioning (#40235)
* context all the things * apply feedback * rollback some alerting changes * rollback some alerting changes #2 * more rollbacks * more rollbacks #2 * more rollbacks #3 * more rollbacks #4 * fix integration test * add missing context * add missing and remove incorrect dispatch
This commit is contained in:
@@ -137,13 +137,14 @@ func (rh fakeIntervalTestReqHandler) HandleRequest(ctx context.Context, dsInfo *
|
||||
//nolint: staticcheck // plugins.DataResponse deprecated
|
||||
func applyScenario(timeRange string, dataSourceJsonData *simplejson.Json, queryModel string, verifier func(query plugins.DataSubQuery)) {
|
||||
Convey("desc", func() {
|
||||
bus.AddHandler("test", func(query *models.GetDataSourceQuery) error {
|
||||
bus.AddHandlerCtx("test", func(ctx context.Context, query *models.GetDataSourceQuery) error {
|
||||
query.Result = &models.DataSource{Id: 1, Type: "graphite", JsonData: dataSourceJsonData}
|
||||
return nil
|
||||
})
|
||||
|
||||
ctx := &queryIntervalTestContext{}
|
||||
ctx.result = &alerting.EvalContext{
|
||||
Ctx: context.Background(),
|
||||
Rule: &alerting.Rule{},
|
||||
RequestValidator: &validations.OSSPluginRequestValidator{},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user