invoke

package
v0.8.32 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package invoke provides gear supporting to facilitate running Plax tests in different environments (and configurations).

Also see cmd/plaxrun.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invocation

type Invocation struct {
	Bindings  map[string]interface{}
	SuiteName string
	Filename  string
	// Dir will be added to ctx.IncludeDirs to resolve YAML (and
	// perhaps other) includes.
	Dir         string
	IncludeDirs []string
	Env         map[string]string
	Seed        int64
	Priority    int
	Labels      string
	Tests       []string
	LogLevel    string
	Verbose     bool
	List        bool

	// ComplainOnAnyError will cause Exec() to return an error if
	// any test case fails or is broken.
	//
	// The default (false) can make sense when the caller's
	// perspective is that test failures are actually normal.
	ComplainOnAnyError bool

	// Retry will override a test's retry policy (if any).
	Retry string

	// React will set dsl.Ctx.Redact to enable log redactions.
	Redact bool
	// contains filtered or unexported fields
}

Invocation struct for execution of a suite of tests

func (*Invocation) Exec

func (inv *Invocation) Exec(ctx context.Context) (*junit.TestSuite, error)

Exec executes the Invocation.

When ComplainOnAnyError is true, then the last test problem (if any) is returned by this method. Otherwise, only a non-test error (if any) is returned.

This method calls Run(t) for each test t in the Invocation.

func (*Invocation) Load

func (inv *Invocation) Load(ctx *dsl.Ctx, filename string) (*dsl.Test, error)

Load a test

func (*Invocation) Run

func (inv *Invocation) Run(ctx *dsl.Ctx, t *dsl.Test) error

Run executes the test with possible retries.

func (*Invocation) RunOnce

func (inv *Invocation) RunOnce(ctx *dsl.Ctx, t *dsl.Test) error

RunOnce executes the test at most one time.

Jump to

Keyboard shortcuts

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