cmdtest

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdTimeout = time.Minute

CmdTimeout defines timeout for a command

View Source
var GrepTimeout = time.Minute

GrepTimeout defines timeout grep is waiting for substring

Functions

func Grep

func Grep(r io.Reader, substr string) (bool, *bytes.Buffer)

Grep reads from reader until finds substring with timeout return result and content that was read

func GrepAndNot

func GrepAndNot(r io.Reader, substr, noSubstr string)

GrepAndNot reads from reader until finds substring with timeout and checks noSubstr was read or fails printing read lines

func GrepTrue

func GrepTrue(r io.Reader, substr string)

GrepTrue reads from reader until finds substring with timeout or fails printing read lines

Types

type IntegrationSuite added in v0.1.3

type IntegrationSuite struct {
	suite.Suite
	Ctx  context.Context
	Stop func()
}

func (*IntegrationSuite) ResetDB added in v0.1.3

func (suite *IntegrationSuite) ResetDB()

ResetDB recreates database for the test

func (*IntegrationSuite) RunCli added in v0.1.3

func (suite *IntegrationSuite) RunCli(cmd string, args ...string) io.Reader

RunCli runs lookout subcommand (not a server)

func (*IntegrationSuite) StartDummy added in v0.1.3

func (suite *IntegrationSuite) StartDummy(args ...string) io.Reader

StartDummy starts dummy analyzer with context and optional arguments

func (*IntegrationSuite) StartServe added in v0.1.3

func (suite *IntegrationSuite) StartServe(args ...string) (io.Reader, io.WriteCloser)

StartServe starts lookout server with context and optional arguments

func (*IntegrationSuite) StoppableCtx added in v0.1.3

func (suite *IntegrationSuite) StoppableCtx()

StoppableCtx return ctx and stop function

Jump to

Keyboard shortcuts

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