clienttest

package
v0.0.0-...-d6cb97c Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultMemTableSize = 8 * (1 << 20) // 8MB

Variables

This section is empty.

Functions

func MockExit

func MockExit(status int)

Mock exit.Exit() implementation for use during testing.

Types

type ClientTestSuite

type ClientTestSuite struct {
	suite.Suite
	TempDir    string
	DBDir      string
	DBDir2     string
	ExitStatus int
	// contains filtered or unexported fields
}

func (*ClientTestSuite) MustRun

func (suite *ClientTestSuite) MustRun(m func(), args []string) (stdout string, stderr string)

MustRun is a wrapper around Run that will panic on Exit or Panic

func (*ClientTestSuite) Run

func (suite *ClientTestSuite) Run(m func(), args []string) (stdout string, stderr string, recoveredErr interface{})

Run will execute a function passing to it commandline args, and captures stdout,stderr. If m() panics the panic is caught, and returned with recoveredError If m() calls exit.Exit() m() will panic and return ExitError with recoveredError

func (*ClientTestSuite) SetupSuite

func (suite *ClientTestSuite) SetupSuite()

func (*ClientTestSuite) TearDownSuite

func (suite *ClientTestSuite) TearDownSuite()

type ExitError

type ExitError struct {
	Code int
}

Jump to

Keyboard shortcuts

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