testsuite

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suite

type Suite struct {
	suite.Suite
	// Out is the outpub buffer
	Out bytes.Buffer
	// Cli is the current CLI
	Cli *cli.Cli
	// contains filtered or unexported fields
}

Suite defines helper test suite

func (*Suite) HasFile

func (s *Suite) HasFile(file string)

HasFile is a helper method to assert that file exists

func (*Suite) HasNoText

func (s *Suite) HasNoText(texts ...string)

HasNoText is a helper method to assert that the out stream does contains the supplied text somewhere

func (*Suite) HasText

func (s *Suite) HasText(texts ...string)

HasText is a helper method to assert that the out stream contains the supplied text somewhere

func (*Suite) HasTextInFile

func (s *Suite) HasTextInFile(file string, texts ...string)

HasTextInFile is a helper method to assert that file contains the supplied text

func (*Suite) Output

func (s *Suite) Output() string

Output returns the current CLI output

func (*Suite) Run

func (s *Suite) Run(action ctl.ControlAction, p interface{}) error

Run is a helper to run a CLI commnd

func (*Suite) SetupSuite

func (s *Suite) SetupSuite()

SetupSuite to set up the tests

func (*Suite) TearDownSuite

func (s *Suite) TearDownSuite()

TearDownSuite to clean up resources

func (*Suite) WithAppFlags

func (s *Suite) WithAppFlags(appFlags []string)

WithAppFlags specifies application flags, default: -V -d

Jump to

Keyboard shortcuts

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