Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct { Name string `json:"name" yaml:"name"` Path string `json:"path" yaml:"path"` Method string `json:"method" yaml:"method"` Body string `json:"body" yaml:"body"` Headers map[string]string `json:"headers" yaml:"headers"` Locals map[string]string `json:"locals" yaml:"locals"` Outputs map[string]string `json:"outputs" yaml:"outputs"` ExpectedHTTPCode int `json:"http_code_is" yaml:"http_code_is"` ExpectedResponseBody string `json:"response_body_contains" yaml:"response_body_contains"` ExpectedResponses []string `json:"response_contains" yaml:"response_contains"` ExpectedHeaders map[string]string `json:"response_headers_contain" yaml:"response_headers_contain"` }
Contract represents the data for a single test case: the definition of the HTTP call and the expected result
type Option ¶
type Option func(*Runner)
Option is a function which can change some properties of the Runner
func WithHTTPClient ¶
WithHTTPClient returns an Option which overrides the default http client
func WithVerboseModeOn ¶
WithVerboseModeOn returns an Option which sets the verbosity of the runner. Default is false.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is the primary struct of this package and is responsible for running the test suite
Click to show internal directories.
Click to hide internal directories.