yaml_file

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaseData

type CaseData struct {
	RequestArgs      map[string]interface{}         `json:"requestArgs" yaml:"requestArgs"`
	ResponseArgs     map[int]map[string]interface{} `json:"responseArgs" yaml:"responseArgs"`
	BeforeScriptArgs map[string]interface{}         `json:"beforeScriptArgs" yaml:"beforeScriptArgs"`
	DbQueryArgs      map[string]interface{}         `json:"dbQueryArgs" yaml:"dbQueryArgs"`
	DbResponseArgs   map[string]interface{}         `json:"dbResponseArgs" yaml:"dbResponseArgs"`
	DbResponse       []string                       `json:"dbResponse" yaml:"dbResponse"`
}

type Test

type Test struct {
	models.TestInterface

	TestDefinition

	Request      string
	Responses    map[int]string
	BeforeScript string
	DbQuery      string
	DbResponse   []string
}

func (*Test) AfterPause added in v1.1.3

func (t *Test) AfterPause() int

func (*Test) BeforePause added in v1.1.3

func (t *Test) BeforePause() int

func (*Test) BeforeScriptPath

func (t *Test) BeforeScriptPath() string

func (*Test) BeforeScriptTimeout

func (t *Test) BeforeScriptTimeout() int

func (*Test) Cookies

func (t *Test) Cookies() map[string]string

func (*Test) DbQueryString

func (t *Test) DbQueryString() string

func (*Test) DbResponseJson

func (t *Test) DbResponseJson() []string

func (*Test) DisallowExtraFields

func (t *Test) DisallowExtraFields() bool

func (*Test) Fixtures

func (t *Test) Fixtures() []string

func (*Test) GetMethod

func (t *Test) GetMethod() string

func (*Test) GetName

func (t *Test) GetName() string

func (*Test) GetResponse

func (t *Test) GetResponse(code int) (string, bool)

func (*Test) Headers

func (t *Test) Headers() map[string]string

func (*Test) IgnoreArraysOrdering

func (t *Test) IgnoreArraysOrdering() bool

func (*Test) NeedsCheckingValues

func (t *Test) NeedsCheckingValues() bool

func (*Test) Path

func (t *Test) Path() string

func (*Test) ServiceMocks

func (t *Test) ServiceMocks() map[string]interface{}

func (*Test) ToJSON

func (t *Test) ToJSON() ([]byte, error)

func (*Test) ToQuery

func (t *Test) ToQuery() string

type TestDefinition

type TestDefinition struct {
	Name               string                 `json:"name" yaml:"name"`
	Method             string                 `json:"method" yaml:"method"`
	RequestURL         string                 `json:"path" yaml:"path"`
	QueryParams        string                 `json:"query" yaml:"query"`
	RequestTmpl        string                 `json:"request" yaml:"request"`
	ResponseTmpls      map[int]string         `json:"response" yaml:"response"`
	BeforeScriptParams beforeScriptParams     `json:"beforeScript" yaml:"beforeScript"`
	HeadersVal         map[string]string      `json:"headers" yaml:"headers"`
	CookiesVal         map[string]string      `json:"cookies" yaml:"cookies"`
	Cases              []CaseData             `json:"cases" yaml:"cases"`
	ComparisonParams   comparisonParams       `json:"comparisonParams" yaml:"comparisonParams"`
	FixtureFiles       []string               `json:"fixtures" yaml:"fixtures"`
	MocksDefinition    map[string]interface{} `json:"mocks" yaml:"mocks"`
	BeforePauseValue   int                    `json:"beforePause" yaml:"beforePause"`
	AfterPauseValue    int                    `json:"afterPause" yaml:"afterPause"`
	DbQueryTmpl        string                 `json:"dbQuery" yaml:"dbQuery"`
	DbResponseTmpl     []string               `json:"dbResponse" yaml:"dbResponse"`
}

type YamlFileLoader

type YamlFileLoader struct {
	testloader.LoaderInterface
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader(testsLocation string) *YamlFileLoader

func (*YamlFileLoader) Load

func (l *YamlFileLoader) Load() (chan models.TestInterface, error)

func (*YamlFileLoader) SetFileFilter

func (l *YamlFileLoader) SetFileFilter(f string)

Jump to

Keyboard shortcuts

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