Tracing: Use tracing.InitializeTracerForTest (#75479)
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
)
|
||||
|
||||
func setupAuthMiddlewareTest(t *testing.T, identity *authn.Identity, authErr error) *contexthandler.ContextHandler {
|
||||
return contexthandler.ProvideService(setting.NewCfg(), tracing.NewFakeTracer(), featuremgmt.WithFeatures(), &authntest.FakeService{
|
||||
return contexthandler.ProvideService(setting.NewCfg(), tracing.InitializeTracerForTest(), featuremgmt.WithFeatures(), &authntest.FakeService{
|
||||
ExpectedErr: authErr,
|
||||
ExpectedIdentity: identity,
|
||||
})
|
||||
|
||||
@@ -251,6 +251,6 @@ func middlewareScenario(t *testing.T, desc string, fn scenarioFunc, cbs ...func(
|
||||
func getContextHandler(t *testing.T, cfg *setting.Cfg, authnService authn.Service) *contexthandler.ContextHandler {
|
||||
t.Helper()
|
||||
|
||||
tracer := tracing.NewFakeTracer()
|
||||
tracer := tracing.InitializeTracerForTest()
|
||||
return contexthandler.ProvideService(cfg, tracer, featuremgmt.WithFeatures(), authnService)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user