cmdtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 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 = 30 * time.Second

GrepTimeout defines timeout grep is waiting for substring

Functions

This section is empty.

Types

type IntegrationSuite added in v0.1.3

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

func (*IntegrationSuite) Grep added in v0.1.4

func (s *IntegrationSuite) 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 (*IntegrationSuite) GrepAndNot added in v0.1.4

func (s *IntegrationSuite) 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 (*IntegrationSuite) GrepTrue added in v0.1.4

func (s *IntegrationSuite) GrepTrue(r io.Reader, substr string)

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

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