testutil

package
v0.0.0-...-4be01c1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCyclesUntil

func ExecuteCyclesUntil(detector core.Detector, accessor *FakeAccessor, clock *FakeClock, end time.Time, stepDuration time.Duration)

Types

type FakeAccessor

type FakeAccessor struct {
	*core.DBCreator
	core.Fetcher
	Insights []int64
	ConnPair *dbconn.PooledPair
}

func NewFakeAccessor

func NewFakeAccessor(t *testing.T) (acessor *FakeAccessor, clear func())

NewFakeAccessor returns an acessor that implements core.Fetcher and core.Creator using a temporary database that should be delete using clear()

func (*FakeAccessor) GenerateInsight

func (c *FakeAccessor) GenerateInsight(ctx context.Context, tx *sql.Tx, properties core.InsightProperties) error

type FakeClock

type FakeClock = timeutil.FakeClock

Jump to

Keyboard shortcuts

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