repotest

package
v0.0.0-...-fc146fb Latest Latest
Warning

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

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

Documentation

Overview

Package repotest is the contract every auth repository must satisfy. Both backends run it, so a behaviour that differs between SQLite and Postgres fails here rather than in production.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newRepositories New)

Run exercises the whole contract.

Types

type New

type New func(t *testing.T) Repositories

New builds repositories over empty storage, once per subtest, so no test sees another's rows.

type Repositories

type Repositories struct {
	User     auth.UserRepository
	Session  auth.SessionRepository
	Token    auth.TokenRepository
	Identity auth.IdentityRepository
}

Jump to

Keyboard shortcuts

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