Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Verbose bool = false
Verbose controls if we build verbose testbeds.
Functions ¶
func RunSubtest ¶
RunSubtest executes t.Run with a sub-test.
Run runs f as a subtest of t called name. It runs f in a separate goroutine and blocks until f returns or calls t.Parallel to become a parallel test. Run reports whether f succeeded (or at least did not fail before calling t.Parallel).
Run may be called simultaneously from multiple goroutines, but all such calls must return before the outer test function for t returns.
Types ¶
type Option ¶
type Option any
Option is a option passed to NewTestbed
func WithVerbose ¶
WithVerbose sets if the verbose mode should be used.
func WithVolumeConfig ¶
WithVolumeConfig passes a custom volume config to load.
type Testbed ¶
type Testbed struct {
// Context is the root context.
Context context.Context
// Logger is the logger
Logger *logrus.Entry
// VolumeController is the test volume controller.
VolumeController volume.Controller
// Volume is the test volume.
Volume volume.Volume
// BucketId is the id of the test bucket.
BucketId string
// StaticResolver is the static resolver.
StaticResolver *srr.Resolver
// Bus is the controller bus
Bus bus.Bus
// StepFactorySet is the transformer step factory set.
StepFactorySet *block_transform.StepFactorySet
// contains filtered or unexported fields
}
Testbed is a constructed testbed.
func NewTestbed ¶
NewTestbed constructs a new core bus with a attached kvtx in-memory volume, logger, and other core controllers required for a test to function.
func (*Testbed) AddReleaseFunc ¶
func (t *Testbed) AddReleaseFunc(cb func())
AddReleaseFunc adds a function to call when Release() is called.
func (*Testbed) BuildEmptyCursor ¶
BuildEmptyCursor builds an empty cursor rooted at the volume in the testbed.