storetest

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package storetest is the conformance suite every herald store backend runs.

Each backend's own test file calls Run with a function that opens a fresh, empty, migrated store. The suite populates every map and JSON field on purpose: a suite that only builds empty structs tests the absence of those fields, which is how serialization bugs survive on one backend and not another.

Index

Constants

This section is empty.

Variables

View Source
var Base = time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC)

Base is the reference instant for fixtures. Whole seconds in UTC, because Mongo keeps milliseconds and Postgres microseconds.

Functions

func Run

func Run(t *testing.T, open Opener)

Run executes every conformance check against the backend open returns.

Types

type Opener

type Opener func(t *testing.T) store.Store

Opener returns a fresh, empty, migrated store. It is called once per subtest, so subtests never see each other's rows.

Jump to

Keyboard shortcuts

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