backgroundtest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package backgroundtest holds contract tests shared by every implementation of the background-work interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunActivityRegistryContract

func RunActivityRegistryContract(
	t *testing.T,
	newRegistry func(t *testing.T) (interfaces.ActivityRegistry, Advance),
)

RunActivityRegistryContract runs the shared ActivityRegistry cases. newRegistry must return an empty registry and a function that advances its clock.

func RunNoticeInboxContract

func RunNoticeInboxContract(
	t *testing.T,
	newInbox func(t *testing.T) (interfaces.NoticeInbox, Advance),
)

RunNoticeInboxContract runs the shared NoticeInbox cases. newInbox must return an empty inbox whose clock starts at 2026-10-14T10:00:00Z, and a function that advances that clock.

Types

type Advance

type Advance func(d time.Duration)

Advance moves the implementation's notion of "now" forward by d.

Jump to

Keyboard shortcuts

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