terminalexpect

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Events = []event.Name{}

Events defines the events that a TestStep is allow to emit

View Source
var Name = "TerminalExpect"

Name is the name used to look this plugin up.

Functions

func Load

func Load() (string, test.TestStepFactory, []event.Name)

Load returns the name, factory and events which are needed to register the step.

func New

func New() test.TestStep

New initializes and returns a new TerminalExpect test step.

Types

type TerminalExpect

type TerminalExpect struct {
	Port    string
	Speed   int
	Match   string
	Timeout time.Duration
}

TerminalExpect reads from a terminal and returns when the given Match string is found on an output line.

func (TerminalExpect) Name

func (ts TerminalExpect) Name() string

Name returns the plugin name.

func (*TerminalExpect) Run

Run executes the terminal step.

func (*TerminalExpect) ValidateParameters

func (ts *TerminalExpect) ValidateParameters(_ xcontext.Context, params test.TestStepParameters) error

ValidateParameters validates the parameters associated to the TestStep

Jump to

Keyboard shortcuts

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