Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertHTTPAPISpec ¶
AssertHTTPAPISpec runs a test suite of HTTP requests against the given base URL to assert it conforms to the affix core API specification. Spec is defined in the "open_api_3.yaml" file in the api package
Types ¶
type TestCase ¶
type TestCase struct {
Endpoint string // API endpoint to test
Method string // HTTP request method, defaults to "GET"
Params map[string]string // Request query or path parameters
Headers map[string]string // Request HTTP headers
Body interface{} // request body
Expect *Response // Assertions about the response
}
TestCase is a single request-response round trip to the API with parameters for constructing the request & expectations for assessing the response.
Click to show internal directories.
Click to hide internal directories.