Replace AddHandler with AddHandlerCtx in tests (#42585)

This commit is contained in:
idafurjes
2021-12-01 15:43:31 +01:00
committed by GitHub
parent 2e3fd9d659
commit e6123bc3ef
37 changed files with 173 additions and 162 deletions

View File

@ -18,7 +18,7 @@ func TestAlertingUsageStats(t *testing.T) {
Bus: bus.New(),
}
ae.Bus.AddHandler(func(query *models.GetAllAlertsQuery) error {
ae.Bus.AddHandlerCtx(func(ctx context.Context, query *models.GetAllAlertsQuery) error {
var createFake = func(file string) *simplejson.Json {
// Ignore gosec warning G304 since it's a test
// nolint:gosec