cachetest

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package cachetest provides a shared backend conformance suite.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBackendConformance

func RunBackendConformance(t *testing.T, harness BackendHarness)

RunBackendConformance exercises selected portable backend assertions. It mutates fixed conformance keys, then calls MakeUnavailable last. Most live calls use Background, so the backend/test runner must bound operations. This is not expiry precision, race, topology or ownership-lease qualification.

Types

type BackendHarness

type BackendHarness struct {
	// Backend is an exclusively test-owned backend with an empty test-key namespace.
	Backend cache.Backend
	// MakeUnavailable is invoked last; it must make operations fail and own service cleanup.
	MakeUnavailable func(*testing.T)
}

BackendHarness supplies a backend and a deterministic way to make it unavailable. MakeUnavailable is called after all live-backend checks.

Jump to

Keyboard shortcuts

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