context

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitCode

func ExitCode(exitCode int) runOptionsFn

func StripAnsi

func StripAnsi(str string) string

func StripAnsiSlice

func StripAnsiSlice(slice []string) []string

func Timeout

func Timeout(dur time.Duration) runOptionsFn

Types

type Config

type Config struct {
	ShellName   string
	BinaryPath  string
	DockerImage string
}

func LoadConfig

func LoadConfig() Config

type TestContext

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

func New

func New(t *testing.T, config Config) (*TestContext, error)

func (*TestContext) AssertContains added in v0.13.0

func (c *TestContext) AssertContains(path, expected string)

func (*TestContext) AssertExist

func (c *TestContext) AssertExist(path string)

func (*TestContext) Cat

func (c *TestContext) Cat(path string) string

func (*TestContext) Cd

func (c *TestContext) Cd(path string)

func (*TestContext) Close

func (c *TestContext) Close() error

func (*TestContext) Cwd

func (c *TestContext) Cwd() string

func (*TestContext) Debug

func (c *TestContext) Debug()

func (*TestContext) GetEnv

func (c *TestContext) GetEnv(name string) string

func (*TestContext) Ls

func (c *TestContext) Ls(path string) []string

func (*TestContext) Run

func (c *TestContext) Run(cmd string, optFns ...runOptionsFn) []string

func (*TestContext) Verbose

func (c *TestContext) Verbose()

func (*TestContext) Write

func (c *TestContext) Write(path, content string)

Jump to

Keyboard shortcuts

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