Documentation
¶
Overview ¶
Package imageloadtest checks a backend's imageload.HTTP against a local server, so each backend's tests hold its system client to the same behavior: status, headers both ways, the body, progress and cancelling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHTTP ¶
func CheckHTTP(t *testing.T, get func(ctx context.Context, url string, header imageload.Header, progress imageload.Progress) (*imageload.Response, error))
CheckHTTP runs get's checks.
func CheckHTTPNoRedirect ¶
func CheckHTTPNoRedirect(t *testing.T, getNoRedirect func(ctx context.Context, url string, header imageload.Header, progress imageload.Progress) (*imageload.Response, error))
CheckHTTPNoRedirect verifies that getNoRedirect returns a 3xx redirect response with its Location header without following it to the target.
func Slow ¶ added in v0.2.0
Slow has imageload answer every http(s) source with body after delay, as a slow network does, until the test ends, and returns n distinct addresses for it. Each call's addresses are new, also to a disk cache an earlier test process filled, so imageload's caches hold none of them yet.
Types ¶
This section is empty.