subrunner

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CauseEffect

type CauseEffect[T frame2.Executor] struct {
	Doc             string
	Patch           T
	Validators      []frame2.Validator
	FailValidators  []frame2.Validator
	ValidatorsRetry frame2.RetryOptions
}

On each cycle executed by Effects, its BaseFrame is patched with the Patch below, and the Validators ensue

type Effects

type Effects[T frame2.Executor, PT interface {
	*T
	Execute() error
}] struct {
	Name      string
	Doc       string
	BaseFrame PT
	Setup     []frame2.Step
	Effects   map[string]CauseEffect[T]
	TearDown  []frame2.Step

	// Each combo contains a list of Effects.  After all
	// of their patches are applied to it, the BaseFrame
	// is run and all of their validators are run.
	Combos map[string][]string

	ExecutionProfile ExecutionProfile
}

A generic cause-effect verifier

On each cycle, the Setup steps will first be executed, then the BaseFrame will be patched with the Patch of the current CauseEffect and executed. Next, its Validators will be run

The Setup is per-cycle. If additional, multi-cycle setup is required, it's up to the enclosing test to provide it.

func (Effects[T, PT]) GetPhase

func (e Effects[T, PT]) GetPhase(runner *frame2.Run) frame2.Phase

func (*Effects[T, PT]) GetStep

func (e *Effects[T, PT]) GetStep() (*frame2.Step, context.CancelFunc)

Stepper

type ExecutionProfile

type ExecutionProfile int
const (
	COMBO ExecutionProfile = iota
	INDIVIDUAL
	BOTH
)

Jump to

Keyboard shortcuts

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