test

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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