Documentation ¶
Index ¶
- func HeadersWithAuth(t *testing.T, token string) http.Header
- func HeadersWithConfigurableAuth(t *testing.T, scheme string, token string) http.Header
- func ParseResponseBody(t *testing.T, res *httptest.ResponseRecorder, v interface{})
- func PerformRequest(t *testing.T, s *api.Server, method string, path string, body GenericPayload, ...) *httptest.ResponseRecorder
- func PerformRequestWithArray(t *testing.T, s *api.Server, method string, path string, ...) *httptest.ResponseRecorder
- func PerformRequestWithArrayAndParams(t *testing.T, s *api.Server, method string, path string, ...) *httptest.ResponseRecorder
- func PerformRequestWithParams(t *testing.T, s *api.Server, method string, path string, body GenericPayload, ...) *httptest.ResponseRecorder
- func PerformRequestWithRawBody(t *testing.T, s *api.Server, method string, path string, body io.Reader, ...) *httptest.ResponseRecorder
- func WithTestServer(t *testing.T, closure func(s *api.Server))
- func WithTestServerConfigurable(t *testing.T, config api.ServerConfig, closure func(s *api.Server))
- func WithTestServerConfigurableContext(ctx context.Context, t *testing.T, config api.ServerConfig, ...)
- type GenericArrayPayload
- type GenericPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseResponseBody ¶
func ParseResponseBody(t *testing.T, res *httptest.ResponseRecorder, v interface{})
func PerformRequest ¶
func PerformRequestWithArray ¶
func WithTestServer ¶
WithTestServer returns a fully configured server (using the default server config).
func WithTestServerConfigurable ¶
WithTestServerConfigurable returns a fully configured server, allowing for configuration using the provided server config.
func WithTestServerConfigurableContext ¶
func WithTestServerConfigurableContext(ctx context.Context, t *testing.T, config api.ServerConfig, closure func(s *api.Server))
WithTestServerConfigurableContext returns a fully configured server, allowing for configuration using the provided server config. The provided context will be used during setup (instead of the default background context).
Types ¶
type GenericArrayPayload ¶
type GenericArrayPayload []interface{}
type GenericPayload ¶
type GenericPayload map[string]interface{}
Click to show internal directories.
Click to hide internal directories.