tests

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownPredicate = errors.New("tests: unknown predicate")

Functions

This section is empty.

Types

type Case

type Case struct {
	Name      string
	Field     metrics.Field
	Predicate Predicate
	Target    metrics.Value
}

type CaseResult

type CaseResult struct {
	Input   Case
	Pass    bool
	Got     metrics.Value
	Summary string
}

type Predicate

type Predicate string

Predicate represents a comparison operator.

const (
	EQ  Predicate = "EQ"
	NEQ Predicate = "NEQ"
	GT  Predicate = "GT"
	GTE Predicate = "GTE"
	LT  Predicate = "LT"
	LTE Predicate = "LTE"
)

func (Predicate) Validate

func (p Predicate) Validate() error

Validate returns ErrUnknownPredicate if p is not a know Predicate, else nil.

type SuiteResult

type SuiteResult struct {
	Pass    bool
	Results []CaseResult
}

func Run

func Run(agg metrics.Aggregate, cases []Case) SuiteResult

Jump to

Keyboard shortcuts

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