cachetest

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: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

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