testutil

package
v0.0.0-...-bd3c554 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustWaitForServer

func MustWaitForServer(port int)

MustWaitForServer waits until the test server responds to health checks.

func SetupRandomRedisNamespace

func SetupRandomRedisNamespace() string

SetupRandomRedisNamespace configures Redis to use a namespace unique to this test process.

func SetupRandomServerPort

func SetupRandomServerPort() int

SetupRandomServerPort configures the HTTP server to listen on a local ephemeral port.

func TestResp

func TestResp[RSP any](t *testing.T, resp *client.Resp, checkFn func(t *testing.T, rsp RSP))

func URL

func URL(port int, path string) string

URL returns an absolute URL for the configured test server port.

func WaitForServer

func WaitForServer(port int, timeout time.Duration) error

WaitForServer waits until the test server responds to health checks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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