testutils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyDown

func KeyDown(model *teatest.TestModel)

KeyDown is a helper function to send a key down message to the model.

func KeyEnter

func KeyEnter(model *teatest.TestModel)

KeyEnter is a helper function to send a key enter message to the model.

func KeyLeft

func KeyLeft(model *teatest.TestModel)

KeyLeft is a helper function to send a key left message to the model.

func KeyQ

func KeyQ(model *teatest.TestModel)

KeyQ is a helper function to send a key q message to the model.

func KeyRight

func KeyRight(model *teatest.TestModel)

KeyRight is a helper function to send a key right message to the model.

func KeyUp

func KeyUp(model *teatest.TestModel)

KeyUp is a helper function to send a key up 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 WaitFor

func WaitFor(t *testing.T, output io.Reader, condition func(output []byte) bool)

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

func WaitForContains(t *testing.T, output io.Reader, text string)

WaitForContains is a helper function to wait for a string to be present in the output.

func WaitForContainsAll

func WaitForContainsAll(t *testing.T, output io.Reader, texts ...string)

WaitForContainsAll is a helper function to wait for all strings to be present in the output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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