clitest

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

fetures: * snima stdout i stderr na disk kako se koji pojavi * vraca nekog tko radi asserts rezultat: stdout, stderr, exitcode \ * moze se postaviti

  • working folder
  • env

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cp

func Cp(src, dst string) error

Copy the src file to dst. Any existing file will be overwritten and will not copy file attributes.

func Show

func Show()

Types

type Env

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

func New

func New(t TestingT) *Env

func (*Env) Cd

func (e *Env) Cd(folderName string) string

func (*Env) CpToWorkdir

func (e *Env) CpToWorkdir(from, to string)

func (*Env) Env

func (e *Env) Env(k, v string) *Env

func (*Env) GetWorkdir

func (e *Env) GetWorkdir() string

func (*Env) Path

func (e *Env) Path(v string) *Env

func (*Env) Run

func (e *Env) Run(name string, arg ...string) *Expect

func (*Env) WaitForURL added in v0.2.6

func (e *Env) WaitForURL(url string, statusCodesToRetry ...int)

func (*Env) WithWorkdir

func (e *Env) WithWorkdir(cb func())

func (*Env) Workdir

func (e *Env) Workdir(wd ...string) *Env

type Expect

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

func (*Expect) Contains

func (e *Expect) Contains(str string) *Expect

func (*Expect) Duration

func (e *Expect) Duration() time.Duration

func (*Expect) Fail

func (e *Expect) Fail() *Expect

func (*Expect) GetAssertFailed

func (e *Expect) GetAssertFailed() bool

func (*Expect) GetStdout

func (e *Expect) GetStdout() string

func (*Expect) SetAssertFailed

func (e *Expect) SetAssertFailed()

func (*Expect) Stderr

func (e *Expect) Stderr() *Expect

func (*Expect) Stdout

func (e *Expect) Stdout() *Expect

func (*Expect) Success

func (e *Expect) Success() *Expect

type TestingT

type TestingT interface {
	Helper()
	Errorf(format string, args ...interface{})
	Logf(format string, args ...interface{})
	Deadline() (deadline time.Time, ok bool)
	Name() string
}

Jump to

Keyboard shortcuts

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