Documentation
¶
Overview ¶
Package cachetest provides a generic constructor helper for the near-identical cache.New(ctx, cfg, dbService, tracer, log) tests that exist once per service package (apigw, verifier, registry). Each service has its own db.Service and cache.Service types, so this is generic over both rather than importing any of them directly, keeping the package leaf-level and import-cycle free.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New[S any, D any](t *testing.T, cfg *model.Cfg, dbService *D, newFn func(context.Context, *model.Cfg, *D, *trace.Tracer, *logger.Log) (*S, error)) (*S, error)
New builds the test logger and tracer, then calls newFn with them, mirroring the boilerplate every service's cache.New unit test needs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.