test

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: BSD-3-Clause Imports: 20 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 CountLines added in v0.8.1

func CountLines(t *testing.T, pattern string) int

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 any, params map[string]int) any

func NewEmptyActionPluginParams added in v0.9.3

func NewEmptyActionPluginParams() *pipeline.ActionPluginParams

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)

func WaitProcessEvents added in v0.8.1

func WaitProcessEvents(t *testing.T, count int, checkInterval, maxTime time.Duration, pattern string)

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