imageloadtest

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Slow(t *testing.T, n int, delay time.Duration, body []byte) []string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL