mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Rename AddHandlerCtx to AddHandler (#43557)
This commit is contained in:
@@ -22,7 +22,7 @@ func TestHealthAPI_Version(t *testing.T) {
|
||||
cfg.BuildCommit = "59906ab1bf"
|
||||
})
|
||||
|
||||
bus.AddHandlerCtx("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
bus.AddHandler("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -45,7 +45,7 @@ func TestHealthAPI_AnonymousHideVersion(t *testing.T) {
|
||||
m, hs := setupHealthAPITestEnvironment(t)
|
||||
hs.Cfg.AnonymousHideVersion = true
|
||||
|
||||
bus.AddHandlerCtx("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
bus.AddHandler("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -68,7 +68,7 @@ func TestHealthAPI_DatabaseHealthy(t *testing.T) {
|
||||
m, hs := setupHealthAPITestEnvironment(t)
|
||||
hs.Cfg.AnonymousHideVersion = true
|
||||
|
||||
bus.AddHandlerCtx("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
bus.AddHandler("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -99,7 +99,7 @@ func TestHealthAPI_DatabaseUnhealthy(t *testing.T) {
|
||||
m, hs := setupHealthAPITestEnvironment(t)
|
||||
hs.Cfg.AnonymousHideVersion = true
|
||||
|
||||
bus.AddHandlerCtx("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
bus.AddHandler("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return errors.New("bad")
|
||||
})
|
||||
|
||||
@@ -131,7 +131,7 @@ func TestHealthAPI_DatabaseHealthCached(t *testing.T) {
|
||||
hs.Cfg.AnonymousHideVersion = true
|
||||
|
||||
// Database is healthy.
|
||||
bus.AddHandlerCtx("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
bus.AddHandler("test", func(ctx context.Context, query *models.GetDBHealthQuery) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user