Documentation
¶
Index ¶
- func Key(model *teatest.TestModel, key string)
- func KeyBackspace(model *teatest.TestModel)
- func KeyDown(model *teatest.TestModel)
- func KeyEnd(model *teatest.TestModel)
- func KeyEnter(model *teatest.TestModel)
- func KeyEscape(model *teatest.TestModel)
- func KeyHome(model *teatest.TestModel)
- func KeyJ(model *teatest.TestModel)
- func KeyK(model *teatest.TestModel)
- func KeyLeft(model *teatest.TestModel)
- func KeyPageDown(model *teatest.TestModel)
- func KeyPageUp(model *teatest.TestModel)
- func KeyQ(model *teatest.TestModel)
- func KeyRight(model *teatest.TestModel)
- func KeyS(model *teatest.TestModel)
- func KeyTab(model *teatest.TestModel)
- func KeyUp(model *teatest.TestModel)
- func NewSaveBuffer() *safeBuffer
- func NewTestDeployEngine(stubValidationEvents []*types.BlueprintValidationEvent) engine.DeployEngine
- func NewTestDeployEngineForInspect(instanceState *state.InstanceState, ...) engine.DeployEngine
- func NewTestDeployEngineForInspectNotFound() engine.DeployEngine
- func NewTestDeployEngineForList(instances []state.InstanceSummary) engine.DeployEngine
- func NewTestDeployEngineForListError() engine.DeployEngine
- func NewTestDeployEngineWithDeployment(stubDeploymentEvents []*types.BlueprintInstanceEvent, instanceID string, ...) engine.DeployEngine
- func NewTestDeployEngineWithDeploymentAndChangeset(stubDeploymentEvents []*types.BlueprintInstanceEvent, instanceID string, ...) engine.DeployEngine
- func NewTestDeployEngineWithDeploymentError(err error) engine.DeployEngine
- func NewTestDeployEngineWithDestroyError(err error) engine.DeployEngine
- func NewTestDeployEngineWithNoInstanceState(stubDeploymentEvents []*types.BlueprintInstanceEvent, instanceID string) engine.DeployEngine
- func NewTestDeployEngineWithStaging(stubStagingEvents []*types.ChangeStagingEvent, changesetID string) engine.DeployEngine
- func NewTestDeployEngineWithStagingError(err error) engine.DeployEngine
- func WaitFor(t *testing.T, output io.Reader, condition func(output []byte) bool)
- func WaitForContains(t *testing.T, output io.Reader, text string)
- func WaitForContainsAll(t *testing.T, output io.Reader, texts ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Key ¶ added in v0.1.3
Key is a generic helper function to send any single key message to the model.
func KeyBackspace ¶ added in v0.1.2
KeyBackspace is a helper function to send a backspace key message to the model.
func KeyEscape ¶ added in v0.1.2
KeyEscape is a helper function to send an escape key message to the model.
func KeyHome ¶ added in v0.1.2
KeyHome is a helper function to send a home key message to the model.
func KeyJ ¶ added in v0.1.2
KeyJ is a helper function to send a 'j' key message to the model (vim down).
func KeyK ¶ added in v0.1.2
KeyK is a helper function to send a 'k' key message to the model (vim up).
func KeyPageDown ¶ added in v0.1.2
KeyPageDown is a helper function to send a page down key message to the model.
func KeyPageUp ¶ added in v0.1.2
KeyPageUp is a helper function to send a page up key message to the model.
func NewSaveBuffer ¶
func NewSaveBuffer() *safeBuffer
NewSaveBuffer creates a new buffer that can be used to capture output from TUI apps in headless mode in a thread-safe manner.
func NewTestDeployEngine ¶
func NewTestDeployEngine(stubValidationEvents []*types.BlueprintValidationEvent) engine.DeployEngine
func NewTestDeployEngineForInspect ¶ added in v0.1.3
func NewTestDeployEngineForInspect( instanceState *state.InstanceState, deploymentEvents []*types.BlueprintInstanceEvent, ) engine.DeployEngine
NewTestDeployEngineForInspect creates a test deploy engine for inspect scenarios. If deploymentEvents is nil, no streaming will occur (static view mode). If deploymentEvents is non-nil, events will be streamed (in-progress mode).
func NewTestDeployEngineForInspectNotFound ¶ added in v0.1.3
func NewTestDeployEngineForInspectNotFound() engine.DeployEngine
NewTestDeployEngineForInspectNotFound creates a test deploy engine for inspect scenarios where the instance is not found.
func NewTestDeployEngineForList ¶ added in v0.1.3
func NewTestDeployEngineForList(instances []state.InstanceSummary) engine.DeployEngine
NewTestDeployEngineForList creates a test deploy engine for list scenarios.
func NewTestDeployEngineForListError ¶ added in v0.1.3
func NewTestDeployEngineForListError() engine.DeployEngine
NewTestDeployEngineForListError creates a test deploy engine that returns an error on list.
func NewTestDeployEngineWithDeployment ¶ added in v0.1.3
func NewTestDeployEngineWithDeployment( stubDeploymentEvents []*types.BlueprintInstanceEvent, instanceID string, instanceState *state.InstanceState, ) engine.DeployEngine
NewTestDeployEngineWithDeployment creates a test deploy engine with deployment event support.
func NewTestDeployEngineWithDeploymentAndChangeset ¶ added in v0.1.3
func NewTestDeployEngineWithDeploymentAndChangeset( stubDeploymentEvents []*types.BlueprintInstanceEvent, instanceID string, instanceState *state.InstanceState, changesetChanges *changes.BlueprintChanges, ) engine.DeployEngine
NewTestDeployEngineWithDeploymentAndChangeset creates a test deploy engine with deployment event support and changeset changes that can be fetched via GetChangeset.
func NewTestDeployEngineWithDeploymentError ¶ added in v0.1.3
func NewTestDeployEngineWithDeploymentError(err error) engine.DeployEngine
NewTestDeployEngineWithDeploymentError creates a test deploy engine that returns an error on CreateBlueprintInstance or UpdateBlueprintInstance.
func NewTestDeployEngineWithDestroyError ¶ added in v0.1.3
func NewTestDeployEngineWithDestroyError(err error) engine.DeployEngine
NewTestDeployEngineWithDestroyError creates a test deploy engine that returns an error on DestroyBlueprintInstance calls.
func NewTestDeployEngineWithNoInstanceState ¶ added in v0.1.3
func NewTestDeployEngineWithNoInstanceState( stubDeploymentEvents []*types.BlueprintInstanceEvent, instanceID string, ) engine.DeployEngine
NewTestDeployEngineWithNoInstanceState creates a test deploy engine that returns an error when GetBlueprintInstance is called (simulating no instance state available).
func NewTestDeployEngineWithStaging ¶ added in v0.1.2
func NewTestDeployEngineWithStaging( stubStagingEvents []*types.ChangeStagingEvent, changesetID string, ) engine.DeployEngine
NewTestDeployEngineWithStaging creates a test deploy engine with staging event support.
func NewTestDeployEngineWithStagingError ¶ added in v0.1.2
func NewTestDeployEngineWithStagingError(err error) engine.DeployEngine
NewTestDeployEngineWithStagingError creates a test deploy engine that returns an error on CreateChangeset.
func WaitFor ¶
WaitFor is a helper function to wait for a condition to be true with a pre-defined check interval (20ms) and timeout duration (10 seconds).
func WaitForContains ¶
WaitForContains is a helper function to wait for a string to be present in the output.
Types ¶
This section is empty.