storetest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 7 Imported by: ? 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 storetest tests implementations of store.Store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestStore

func TestStore(t *testing.T, newStore func(t *testing.T) (store.Store, Clock))

TestStore runs the tests of a store.Store. newStore returns an empty store and the clock it uses to expire the sessions. The clock starts at a time truncated to the millisecond.

Types

type Clock

type Clock interface {
	// Now returns the current time of the store.
	Now() time.Time
	// Advance moves the time of the store forward by d.
	Advance(d time.Duration)
}

Clock is the time seen by a store under test.

Jump to

Keyboard shortcuts

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