config

package
v0.0.0-...-93ea535 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	Username *tmpl.Template
	Password *tmpl.Template
}

type Config

type Config struct {
	Scenarios map[string]*Scenario
	Options   *Options
}

func (*Config) ApplyOverride

func (c *Config) ApplyOverride(override *Override)

func (*Config) EnableTests

func (c *Config) EnableTests(tests []string) error

type Options

type Options struct {
	ForceSequential bool
	MaxParallelism  int
}

type Override

type Override struct {
	Options *Options
}

type Request

type Request struct {
	URL     *tmpl.Template
	Method  string
	Auth    *BasicAuth
	Headers map[string][]*tmpl.Template
	Body    *tmpl.Template
}

type Response

type Response struct {
	Status  *regexp.Regexp
	Extract map[string]*ValueExtractor
}

type Scenario

type Scenario struct {
	Name         string
	Enabled      bool
	Disabled     bool
	Dependencies []string
	Parallel     bool
	Tests        []*Test
}

func (*Scenario) AllDependencies

func (s *Scenario) AllDependencies(config *Config) map[string]struct{}

func (*Scenario) ContainsTest

func (s *Scenario) ContainsTest(testName string) bool

func (*Scenario) EnableTests

func (s *Scenario) EnableTests(enabled []string)

type Test

type Test struct {
	Name          string
	Enabled       bool
	Disabled      bool
	Request       *Request
	Response      *Response
	Retries       int
	RetryInterval time.Duration
}

type ValueAssertion

type ValueAssertion struct {
	Pattern *regexp.Regexp
	Schema  *gojsonschema.Schema
}

type ValueExtractor

type ValueExtractor struct {
	JQ      string
	IsList  bool
	Pattern *regexp.Regexp
	Assert  *ValueAssertion
	Header  string
}

Jump to

Keyboard shortcuts

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