testing

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMap added in v1.1.1

func ToMap(m map[string]interface{}) map[string]interface{}

func TryToMap added in v1.1.1

func TryToMap(input interface{}) interface{}

Types

type Case

type Case interface {
	Run(ctx context.Context, rt runtime.Runtime, params Params) error
}

func New

func New(opts Options) (Case, error)

type DataContext

type DataContext struct {
	Query DataContextValues `json:"query"`
}

type DataContextValues

type DataContextValues struct {
	Result interface{}            `json:"result"`
	Params map[string]interface{} `json:"params"`
}

type Options added in v0.6.0

type Options struct {
	File    sources.File
	Timeout time.Duration
}

type Params

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

func NewParams

func NewParams() Params

func (*Params) Clone

func (p *Params) Clone() Params

func (*Params) SetSystemValue

func (p *Params) SetSystemValue(name string, value interface{})

func (*Params) SetUserValue

func (p *Params) SetUserValue(name string, value interface{})

func (*Params) SetUserValues

func (p *Params) SetUserValues(values map[string]interface{})

func (*Params) ToMap

func (p *Params) ToMap() map[string]interface{}

type ScriptManifest

type ScriptManifest struct {
	Text   string                 `yaml:"text"`
	Ref    string                 `yaml:"ref"`
	Params map[string]interface{} `yaml:"params"`
}

type Suite

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

func NewSuite

func NewSuite(opts Options) (*Suite, error)

func (*Suite) Run

func (suite *Suite) Run(ctx context.Context, rt runtime.Runtime, params Params) error

type SuiteManifest

type SuiteManifest struct {
	Timeout uint64         `yaml:"timeout"`
	Query   ScriptManifest `yaml:"query"`
	Assert  ScriptManifest `yaml:"assert"`
}

type Unit

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

func NewUnit

func NewUnit(opts Options) (*Unit, error)

func (*Unit) Run

func (unit *Unit) Run(ctx context.Context, rt runtime.Runtime, params Params) error

Jump to

Keyboard shortcuts

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