apitest

package
v0.109.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Kind represents the type definition of this config.
	Kind = "apitest"

	// APIVersion represents the supported config version.
	APIVersion = "v1alpha"
)

Config descriptors.

Functions

func SetDefaults

func SetDefaults(p *Project)

SetDefaults applies config defaults in case the user has left them blank.

func Validate

func Validate(p Project) error

Types

type Project

type Project struct {
	config.TypeDef `yaml:",inline" mapstructure:",squash"`
	ConfigFilePath string             `yaml:"-" json:"-"`
	Suites         []Suite            `yaml:"suites,omitempty"`
	Sauce          config.SauceConfig `yaml:"sauce,omitempty"`
}

Project represents the apitest project configuration.

func FromFile

func FromFile(cfgPath string) (Project, error)

FromFile creates a new apitest Project based on the filepath cfgPath.

type Runner

type Runner struct {
	Project       Project
	Client        apitesting.Client
	Region        region.Region
	Reporters     []report.Reporter
	Async         bool
	TunnelService tunnel.Service
}

Runner represents an executor for api tests

func (*Runner) RunProject

func (r *Runner) RunProject() (int, error)

RunProject runs the tests defined in apitest.Project

type Suite

type Suite struct {
	Name   string   `yaml:"name,omitempty"`
	HookID string   `yaml:"hookId,omitempty"`
	Tags   []string `yaml:"tags,omitempty"`
	Tests  []string `yaml:"tests,omitempty"`
}

Suite represents the apitest suite configuration.

Jump to

Keyboard shortcuts

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