Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Harness ¶
Harness runs real AutoFlow flows on a production-shaped autocore engine. Flowcore drives flows; DB is the autocore-level escape hatch for fault injection and assertions (e.g. testautocore.WaitForState(t, h.DB, ...)).
func NewHarness ¶
func NewHarness(t *testing.T, central, workflow *pgxpool.Pool, redis rueidis.Client, opts ...Option) *Harness
NewHarness builds the production AutoFlow composition against the per-test central and workflow databases (e.g. from AutocorePostgres.WithDBs), runs the engine, and blocks until it owns its shards.
type Option ¶
type Option func(*config)
Option configures a Harness.
func WithMaxSuspendedWorkflows ¶ added in v19.3.0
WithMaxSuspendedWorkflows overrides how many workflow goroutines may stay suspended between rounds. Pass 0 to make every suspension fail, which turns every round into a cold replay: the only way for a test to exercise the replay path, since a warm resume continues the goroutine from its yield instead.
func WithModules ¶
func WithModules(m ...pkg_autoflow.Module) Option
WithModules registers AutoFlow modules (real or a generated MockModule) for the flow under test. Loading an unregistered module name fails the flow with a clear error.
type RemoteModule ¶
type RemoteModule struct {
TB testing.TB
Client autoflow_rpc.ModuleAPIClient
TunnelClient autoflow_rpc.ModuleTunnelAPIClient
// contains filtered or unexported fields
}
RemoteModule is a remote AutoFlow module that can be used for testing.
func (*RemoteModule) Run ¶
func (m *RemoteModule) Run(ctx context.Context)