tracertest

package
v0.7.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package tracertest provides a shared *trace.Tracer constructor for use in unit tests.

It intentionally lives in its own leaf package, separate from pkg/testsupport: pkg/trace depends on pkg/model, which in turn depends on packages (e.g. pkg/mdoc) that import pkg/cache. pkg/cache's own tests import pkg/testsupport for its Docker/Mongo container helpers, so adding a pkg/trace dependency to pkg/testsupport itself would create an import cycle. Keeping the tracer helper here, imported only by packages that don't sit on that cycle, avoids the problem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t *testing.T, cfg *model.Cfg, log *logger.Log, serviceName string) *trace.Tracer

New builds a *trace.Tracer suitable for use in unit tests, tagged with the given service name.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL