test

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 13 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Begin

func Begin(t *testing.T) (*manager.Media, context.Context)

Begin returns the shared test manager and a per-test context.

func Client added in v1.9.2

func Client(t *testing.T) *httpclient.Client

Client returns the shared HTTP client, wired to a test server with the standard handlers registered.

func End

func End(t *testing.T)

End releases the per-test context created by Begin.

func Main

func Main(m *testing.M, setup func(*manager.Media) (func(), error), opts ...manager.Opt)

Main is the test main function for tests. It starts up a container and runs the tests, providing a manager instance, and an HTTP client wired to a test server with the standard handlers registered, to each test.

func ServerURL added in v1.9.3

func ServerURL(t *testing.T) string

ServerURL returns the base URL of the shared test server - useful for a test that needs to make a raw HTTP request (e.g. a multipart upload with a custom Accept header) rather than going through Client.

func TaskManager added in v1.9.3

func TaskManager(t *testing.T) *taskmanager.Manager

TaskManager returns the shared task manager - useful for a test to wait on or inspect a task started by the Media under test (e.g. Media.Encode), which doesn't wait for completion itself.

Types

This section is empty.

Jump to

Keyboard shortcuts

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