Documentation
¶
Index ¶
Constants ¶
View Source
const ( // StatusAssertion asserts response status StatusAssertion assertionKind = "status" // BodyAssertion asserts response body BodyAssertion assertionKind = "body" )
View Source
const ( GET httpMethod = "GET" POST httpMethod = "POST" PUT httpMethod = "PUT" PATCH httpMethod = "PATCH" DELETE httpMethod = "DELETE" OPTIONS httpMethod = "OPTIONS" HEAD httpMethod = "HEAD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
Kind assertionKind
Expected interface{}
Actual interface{}
Msg string
}
Assertion is a result of predicate execution
type Assertions ¶
Assertions is a logical aggregation of assertion
func NewAssertions ¶
func NewAssertions(name string) *Assertions
NewAssertions creates an empty Assertions
func (*Assertions) AddOf ¶
func (as *Assertions) AddOf(kind assertionKind, expected, actual interface{}, msg string)
AddOf adds a new assertion
type Playbook ¶
type Playbook struct {
Name string `json:"name"`
Vars Vars `json:"vars"`
Stages []*Stage `json:"stages"`
}
Playbook is a named stages composition
type Request ¶
type Request struct {
Url string `json:"url"`
Method httpMethod `json:"method"`
Json map[string]interface{} `json:"json"`
Form map[string]string `json:"form"`
Query map[string]string `json:"query"`
Headers map[string]string `json:"headers"`
}
Request describes an http request to be executed as apart of a stage
type Response ¶
type Response struct {
Code int `json:"code"`
Body map[string]interface{} `json:"body"`
Save *SaveResp `json:"save"`
}
Request describes an http response to be asserted as apart of a stage
Click to show internal directories.
Click to hide internal directories.