testutil

package
v0.0.0-...-1a3a2fa Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SmallMP3

func SmallMP3() []byte

func StatCaller

func StatCaller(t *testing.T, baseTime time.Time, numCalls, numPartitions int, jitter float32, interval common.Interval) iter.Seq2[int, time.Time]

StatCaller returns an iterator that spreads numCalls over the period of time of numPartitions*interval with jitter (typically 0.1 or 10%) jitter. The times will always be monotonically incrementing.

func UUID

func UUID(s string) string

Types

type AdminSubject

type AdminSubject struct{}

func (*AdminSubject) GetName

func (*AdminSubject) GetName() string

func (*AdminSubject) GetRoles

func (*AdminSubject) GetRoles() []string

func (*AdminSubject) String

func (*AdminSubject) String() string

type DB

type DB struct {
	*database.Postgres
	SchemaName string
	PartConfig config.Partition
	// contains filtered or unexported fields
}

func NewDB

func NewDB(opts ...DBOpt) *DB

func (*DB) Cleanup

func (db *DB) Cleanup()

func (*DB) NowFunc

func (db *DB) NowFunc() NowFunc

type DBOpt

type DBOpt func(*dbOpts)

func WithNow

func WithNow(nf NowFunc) DBOpt

func WithPartConfig

func WithPartConfig(pc PartConfig) DBOpt

type NowFunc

type NowFunc func() time.Time

type PartConfig

type PartConfig func(schema string) config.Partition

func CustomPartConfig

func CustomPartConfig(cfg config.Partition) PartConfig

func DailyPartConfig

func DailyPartConfig() PartConfig

Jump to

Keyboard shortcuts

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