Documentation ¶
Index ¶
- func Assert(expected interface{}, actual interface{}) error
- func RoundTripperQueue(t *testing.T, queue []RoundTripFunc) http.RoundTripper
- type AssertFailure
- type ExpectedTestRequest
- type ResponseModifier
- type ResponseModifierFunc
- type RoundTripFunc
- type RoundTripper
- type TestResponse
- type TestResponseFile
- type TestResponseNoContent
- type TestResponseURLError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoundTripperQueue ¶
func RoundTripperQueue(t *testing.T, queue []RoundTripFunc) http.RoundTripper
Types ¶
type AssertFailure ¶
type AssertFailure struct { Expected interface{} `json:"expected"` Actual interface{} `json:"actual"` }
type ExpectedTestRequest ¶
type ResponseModifier ¶ added in v0.0.37
type ResponseModifierFunc ¶ added in v0.0.37
func WithResponseHeaders ¶ added in v0.0.37
func WithResponseHeaders(headers map[string][]string) ResponseModifierFunc
func (ResponseModifierFunc) ModifyResponse ¶ added in v0.0.37
func (r ResponseModifierFunc) ModifyResponse(response *http.Response)
type RoundTripFunc ¶
func ServeAndValidate ¶
func ServeAndValidate(t *testing.T, r TestResponse, expected ExpectedTestRequest) RoundTripFunc
type RoundTripper ¶
type TestResponse ¶
type TestResponseFile ¶
type TestResponseFile struct { StatusCode int FilePath string ResponseModifiers []ResponseModifier }
func (*TestResponseFile) CreateResponse ¶
func (f *TestResponseFile) CreateResponse() (*http.Response, error)
type TestResponseNoContent ¶ added in v0.0.35
type TestResponseNoContent struct {
StatusCode int
}
func (*TestResponseNoContent) CreateResponse ¶ added in v0.0.35
func (f *TestResponseNoContent) CreateResponse() (*http.Response, error)
type TestResponseURLError ¶ added in v0.0.50
func (*TestResponseURLError) CreateResponse ¶ added in v0.0.50
func (f *TestResponseURLError) CreateResponse() (*http.Response, error)
Click to show internal directories.
Click to hide internal directories.