tests

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(matcher matches.Matcher, name string)

Register a matcher under a name.

Types

type Outcome

type Outcome struct {
	Status   string
	Name     string
	Error    error
	Matcher  string
	Template string
}

Outcome is returned by a run.

type Runner

type Runner interface {
	Run() error
}

Runner can execute a suite of tests and return any none 0 exit statuses.

type Suite

type Suite struct {
	Suite    string `json:"suite"`
	Tests    []Test `json:"tests"`
	Template string `json:"template"`
}

type SuiteRunner

type SuiteRunner struct {
	Location string
	Update   bool
}

SuiteRunner is a standard suite runner that runs suits sequentially.

func NewSuiteRunner

func NewSuiteRunner(location string, update bool) *SuiteRunner

NewSuiteRunner initializes the runner with a specific location to run tests from.

func (*SuiteRunner) Run

func (s *SuiteRunner) Run(ctx context.Context) ([]Outcome, error)

Run runs a suite of tests in sequence.

type Test

type Test struct {
	It      string                  `json:"it"`
	Asserts []*apiextensionsv1.JSON `json:"asserts"`
}

Jump to

Keyboard shortcuts

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