backendtest

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package backendtest is a conformance suite for recall.Backend implementations. A backend package runs it against a live database:

func TestConformance(t *testing.T) {
	backendtest.Run(t, func(t *testing.T) recall.Backend { return newBackend(t) })
}

Each subtest uses its own collection, named from the test, so a suite can share one database with other runs. The suite checks the storage contract Recall's fold depends on (exact totals, a stable ordered prefix, filters, read-after-write) and then drives a Client over the backend end to end.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collection added in v0.19.0

func Collection(t *testing.T) string

Collection names a fresh collection for one test, from the test's name, the time the process started and a counter, so suites can share a database with other runs and with repeats of themselves (go test -count).

func Run

func Run(t *testing.T, newBackend func(t *testing.T) recall.Backend)

Run runs every conformance check. newBackend is called once per subtest. The checks for optional capabilities (Get, text search, watermarks, leases) skip on a backend that does not offer them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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