testhelpers

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAvailablePort

func FindAvailablePort() (int, error)

FindAvailablePort finds an available port for testing purposes. Returns a port number that is currently available for binding.

func WithTestContext

func WithTestContext(t *testing.T, timeout time.Duration, testFunc func(t *testing.T, tmpDir string))

WithTestContext creates a temporary directory for a test, changes the CWD to it, and ensures everything is cleaned up afterward. It also enforces a timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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