testutil

package
v1.14.19 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 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())

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