Documentation
¶
Overview ¶
Package assert provides testing helpers and assertion wrappers for flow engine tests
Index ¶
- Constants
- type FlowRef
- type Getter
- type Wrapper
- func (w *Wrapper) ConfigInvalid(cfg *config.Config, contains string)
- func (w *Wrapper) ConfigValid(cfg *config.Config)
- func (w *Wrapper) Eventually(condition func() bool, timeout time.Duration, msg string)
- func (w *Wrapper) EventuallyWithError(condition func() error, timeout time.Duration, msg string)
- func (w *Wrapper) FlowHasState(ref FlowRef, keys ...api.Name)
- func (w *Wrapper) FlowStateEquals(ref FlowRef, key api.Name, expected any)
- func (w *Wrapper) FlowStatus(flow api.FlowState, expected api.FlowStatus)
- func (w *Wrapper) StepInvalid(t *api.Step, expectedErrorContains string)
- func (w *Wrapper) StepValid(t *api.Step)
Constants ¶
const DefaultRetryInterval = 100 * time.Millisecond
DefaultRetryInterval is the default polling interval for Eventually checks
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wrapper ¶
type Wrapper struct {
*testing.T
*assert.Assertions
Require *assert.Assertions
}
Wrapper wraps testify assertions with Argyll-specific helpers
func New ¶
New creates a new test assertion wrapper with both assert and require from testify plus Argyll-specific helpers
func (*Wrapper) ConfigInvalid ¶
ConfigInvalid asserts that a configuration is invalid
func (*Wrapper) ConfigValid ¶
ConfigValid asserts that a configuration is valid
func (*Wrapper) Eventually ¶
Eventually runs a condition repeatedly until it passes or times out
func (*Wrapper) EventuallyWithError ¶
EventuallyWithError runs a condition that returns an error until it succeeds or times out
func (*Wrapper) FlowHasState ¶
FlowHasState asserts that a flow has specific state keys
func (*Wrapper) FlowStateEquals ¶
FlowStateEquals asserts that a state key has the expected value
func (*Wrapper) FlowStatus ¶
func (w *Wrapper) FlowStatus(flow api.FlowState, expected api.FlowStatus)
FlowStatus asserts the status of a flow
func (*Wrapper) StepInvalid ¶
StepInvalid asserts that a step is invalid