tests

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 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, *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"`
}

type Tests

type Tests struct {
	Version string            `yaml:"testsVersion"`
	Tests   map[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