testutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testutil provides shared fixtures for Sforza tests.

Index

Constants

View Source
const AdminSub = "admin-user-sub"

AdminSub is the bootstrap administrator subject used in tests.

Variables

View Source
var Drivers = []string{"sqlite", "json"}

Drivers are the storage backends that can be exercised without external services.

View Source
var Tenants = []string{"tenant-a", "tenant-b"}

Tenants are the tenant IDs configured by NewStores.

Functions

func NewStores

func NewStores(t *testing.T) *store.Stores

NewStores opens migrated SQLite stores in a temp dir.

func NewStoresDriver

func NewStoresDriver(t *testing.T, driver string) *store.Stores

NewStoresDriver opens stores backed by the given driver in a temp dir.

func StorageConfig

func StorageConfig(t *testing.T) config.Storage

StorageConfig returns an SQLite storage configuration rooted in a temp dir.

func StorageConfigDriver

func StorageConfigDriver(t *testing.T, driver string) config.Storage

StorageConfigDriver returns a storage configuration for the given driver, rooted in a temp dir.

Types

This section is empty.

Jump to

Keyboard shortcuts

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