tests

package
v1.23.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestsVersion = "0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameters

type Parameters struct {
	Path   *orderedmap.OrderedMap[string, yaml.Node] `yaml:"path,omitempty"`
	Query  *orderedmap.OrderedMap[string, yaml.Node] `yaml:"query,omitempty"`
	Header *orderedmap.OrderedMap[string, yaml.Node] `yaml:"header,omitempty"`
}

type Test

type Test struct {
	Name        string                                    `yaml:"name"`
	Description string                                    `yaml:"description,omitempty"`
	Targets     []string                                  `yaml:"targets,omitempty"`
	Server      string                                    `yaml:"server,omitempty"`
	Security    yaml.Node                                 `yaml:"security,omitempty"`
	Parameters  *Parameters                               `yaml:"parameters,omitempty"`
	RequestBody *orderedmap.OrderedMap[string, yaml.Node] `yaml:"requestBody,omitempty"`
	Responses   *orderedmap.OrderedMap[string, yaml.Node] `yaml:"responses,omitempty"`

	// Internal use only
	InternalID      string                                 `yaml:"internalId,omitempty"`
	TestGroups      []string                               `yaml:"testGroups,omitempty"`
	InternalEnvVars *orderedmap.OrderedMap[string, string] `yaml:"internalEnvVars,omitempty"`
}

func (Test) GetResponse added in v1.21.0

func (t Test) GetResponse(statusCode string) (*orderedmap.OrderedMap[string, yaml.Node], bool, error)

type Tests

type Tests struct {
	Version string                                 `yaml:"testsVersion"`
	Tests   *orderedmap.OrderedMap[string, []Test] `yaml:"tests"`
}

func Load

func Load(dir string) (*Tests, string, error)

func (Tests) Validate

func (t Tests) Validate() error

Jump to

Keyboard shortcuts

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