Documentation
¶
Index ¶
- func ExitCode(exitCode int) runOptionsFn
- func StripAnsi(str string) string
- func StripAnsiSlice(slice []string) []string
- func Timeout(dur time.Duration) runOptionsFn
- type Config
- type TestContext
- func (c *TestContext) AssertContains(t *testing.T, path, expected string)
- func (c *TestContext) AssertExist(t *testing.T, path string)
- func (c *TestContext) Cat(t *testing.T, path string) string
- func (c *TestContext) Cd(t *testing.T, path string) []string
- func (c *TestContext) Close() error
- func (c *TestContext) Cwd(t *testing.T) string
- func (c *TestContext) Debug()
- func (c *TestContext) GetEnv(t *testing.T, name string) string
- func (c *TestContext) Ls(t *testing.T, path string) []string
- func (c *TestContext) Run(t *testing.T, cmd string, optFns ...runOptionsFn) []string
- func (c *TestContext) Verbose()
- func (c *TestContext) Write(t *testing.T, path, content string)
- func (c *TestContext) WriteLines(t *testing.T, path string, lines ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripAnsiSlice ¶
Types ¶
type Config ¶
func LoadConfig ¶
func LoadConfig() Config
type TestContext ¶
type TestContext struct {
// contains filtered or unexported fields
}
func New ¶
func New(config Config) (*TestContext, error)
func (*TestContext) AssertContains ¶ added in v0.13.0
func (c *TestContext) AssertContains(t *testing.T, path, expected string)
func (*TestContext) AssertExist ¶
func (c *TestContext) AssertExist(t *testing.T, path string)
func (*TestContext) Close ¶
func (c *TestContext) Close() error
func (*TestContext) Debug ¶
func (c *TestContext) Debug()
func (*TestContext) Run ¶
func (c *TestContext) Run(t *testing.T, cmd string, optFns ...runOptionsFn) []string
func (*TestContext) Verbose ¶
func (c *TestContext) Verbose()
func (*TestContext) WriteLines ¶ added in v0.14.0
func (c *TestContext) WriteLines(t *testing.T, path string, lines ...string)
Click to show internal directories.
Click to hide internal directories.