tester

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTestTimeout = time.Minute

Variables

View Source
var ErrFailed = errors.New("test failed")

ErrFailed is returned when a test fails

Functions

This section is empty.

Types

type Option

type Option func(*Tester) error

Option is a functional option for extractors.

func WithTestTimeout

func WithTestTimeout(timeout time.Duration) Option

type Options

type Options []Option

Options is a slice of Option.

func (Options) Apply

func (o Options) Apply(t *Tester) error

Apply interates over Options and calls each functional option with a given tester.

type Tester

type Tester struct {
	// contains filtered or unexported fields
}

Tester is a plugin that tests the action outcome in a running Falco instance via the gRCP API.

func New

func New(config *client.Config, options ...Option) (*Tester, error)

New returns a new Tester instance.

func (*Tester) PostRun

func (t *Tester) PostRun(ctx context.Context, log *logger.Entry, n string, f events.Action, actErr error) error

func (*Tester) PreRun

func (t *Tester) PreRun(ctx context.Context, log *logger.Entry, n string, f events.Action) (err error)

Jump to

Keyboard shortcuts

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