test

package
v0.87.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: BSD-3-Clause Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 NewOffset added in v0.41.1

func NewOffset(current int64) pipeline.Offsets

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