test

package
v0.5.18 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckNotZero

func CheckNotZero(t *testing.T, target string, msg string) int64

func CheckZero

func CheckZero(t *testing.T, target string, msg string) int64

func ClearDir

func ClearDir(t *testing.T, dir string)

func GetMatches

func GetMatches(t *testing.T, pattern string) []string

func NewActionPluginStaticInfo

func NewActionPluginStaticInfo(factory pipeline.PluginFactory, config pipeline.AnyConfig, mode pipeline.MatchMode, conds pipeline.MatchConditions, matchInvert bool) []*pipeline.ActionPluginStaticInfo

func NewConfig

func NewConfig(config interface{}, params map[string]int) interface{}

func NewEmptyOutputPluginParams

func NewEmptyOutputPluginParams() *pipeline.OutputPluginParams

func NewPipeline

func NewPipeline(actions []*pipeline.ActionPluginStaticInfo, pipelineOpts ...string) *pipeline.Pipeline

func NewPipelineMock

func NewPipelineMock(actions []*pipeline.ActionPluginStaticInfo, pipelineOpts ...string) (*pipeline.Pipeline, *fake.Plugin, *devnull.Plugin)

func NewPluginStaticInfo

func NewPluginStaticInfo(factory pipeline.PluginFactory, config pipeline.AnyConfig) *pipeline.PluginStaticInfo

func RunCase

func RunCase(testCase *Case, inputInfo *pipeline.InputPluginInfo, eventCount int, pipelineOpts ...string)

func SendPack

func SendPack(t *testing.T, p *pipeline.Pipeline, msgs []Msg) int64

func WaitForEvents

func WaitForEvents(x *atomic.Int32)

Types

type Case

type Case struct {
	Prepare func()
	Act     func(pipeline *pipeline.Pipeline)
	Assert  func(pipeline *pipeline.Pipeline)
	Out     func(event *pipeline.Event)
}

type Msg

type Msg []byte

type Opts

type Opts []string

func (Opts) Has

func (o Opts) Has(opt string) bool

Jump to

Keyboard shortcuts

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