Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v1.19.26 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpectInteractive

func ExpectInteractive(userInput func(*Console), testCli func(), timeout *time.Duration)

timeout is the max execution time for testCli()

func Stdio

func Stdio(c *expect.Console) terminal.Stdio

Types

type Console

type Console struct {
	// contains filtered or unexported fields
}

func (*Console) Esc

func (c *Console) Esc()

func (*Console) ExpectEOF

func (c *Console) ExpectEOF() string

func (*Console) ExpectString

func (c *Console) ExpectString(s string) string

func (*Console) PressDown

func (c *Console) PressDown()

func (*Console) SendLine

func (c *Console) SendLine(s string) int

type MockKubectl added in v1.11.54

type MockKubectl struct {
	Expected        []string
	Next            int
	StdoutLines     []string
	StdoutLineIndex int
}

func NewMockKubectl added in v1.11.54

func NewMockKubectl(cmds []string, stdoutLines []string) *MockKubectl

func (*MockKubectl) Kubectl added in v1.11.54

func (k *MockKubectl) Kubectl(stdin io.Reader, args ...string) error

func (*MockKubectl) KubectlOut added in v1.11.54

func (k *MockKubectl) KubectlOut(stdin io.Reader, args ...string) ([]byte, error)

Jump to

Keyboard shortcuts

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