Documentation ¶
Overview ¶
Package testing provides functionality for use when conducting tests
Index ¶
- func NewTestInstance(configFile string, defaultPathConfigs func(*oo.Options) map[string]*po.Options, ...) (*httptest.Server, *httptest.ResponseRecorder, *http.Request, *http.Client, ...)
- func NewTestPathConfig(oc *oo.Options, defaultPathConfigs func(*oo.Options) map[string]*po.Options, ...) *po.Options
- func NewTestServer(responseCode int, responseBody string, headers map[string]string) *httptest.Server
- func NewTestTracer() *tracing.Tracer
- func NewTestWebClient() *http.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestInstance ¶
func NewTestInstance( configFile string, defaultPathConfigs func(*oo.Options) map[string]*po.Options, respCode int, respBody string, respHeaders map[string]string, originType, urlPath, logLevel string, ) (*httptest.Server, *httptest.ResponseRecorder, *http.Request, *http.Client, error)
NewTestInstance will start a trickster
func NewTestPathConfig ¶
func NewTestPathConfig( oc *oo.Options, defaultPathConfigs func(*oo.Options) map[string]*po.Options, urlPath string, ) *po.Options
NewTestPathConfig returns a path config based on the provided parameters
func NewTestServer ¶
func NewTestServer(responseCode int, responseBody string, headers map[string]string) *httptest.Server
NewTestServer returns a new httptest.Server that responds with the provided code, body and headers
func NewTestTracer ¶
NewTestTracer returns a standard out tracer for testing purposes
func NewTestWebClient ¶
NewTestWebClient returns a new *http.Client configured with reasonable defaults
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.