Tracing: Use tracing.InitializeTracerForTest (#75479)

This commit is contained in:
Marcus Efraimsson
2023-09-27 09:51:57 +02:00
committed by GitHub
parent af8a46adbb
commit 0128d0403f
18 changed files with 132 additions and 212 deletions
+1 -1
View File
@@ -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,
})
+1 -1
View File
@@ -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)
}