expectations

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Maker

type Maker interface {
	MakeMetricsExpectation(config *types.MetricsExpectation) (*MetricsExpectation, error)
	MakeOutputExpectation(config *types.OutputExpectation) (*OutputExpectation, error)
	MakeResponseExpectation(config *types.ResponseExpectation) (*ResponseExpectation, error)
}

func CreateMaker

func CreateMaker(fnd app.Foundation, parametersMaker parameters.Maker) Maker

type MatchType

type MatchType string
const (
	MatchTypeExact  MatchType = "exact"
	MatchTypeRegexp MatchType = "regexp"
)

type MetricRule

type MetricRule struct {
	Metric   string
	Operator metrics.MetricOperator
	Value    float64
}

type MetricsExpectation

type MetricsExpectation struct {
	Id    string
	Rules []MetricRule
}

type OrderType

type OrderType string
const (
	OrderTypeFixed  OrderType = "fixed"
	OrderTypeRandom OrderType = "random"
)

type OutputExpectation

type OutputExpectation struct {
	OrderType      OrderType
	MatchType      MatchType
	OutputType     OutputType
	Messages       []string
	RenderTemplate bool
}

type OutputType

type OutputType string
const (
	OutputTypeStdout OutputType = "stdout"
	OutputTypeStderr OutputType = "stderr"
	OutputTypeAny    OutputType = "any"
)

type ResponseExpectation

type ResponseExpectation struct {
	Request            string
	Headers            types.Headers
	BodyContent        string
	BodyMatch          MatchType
	BodyRenderTemplate bool
}

Jump to

Keyboard shortcuts

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