testutil

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestRunDir

func GetTestRunDir() string

GetTestRunDir returns the unique directory for this test run. It creates a directory in the system temp directory with a unique subdirectory based on the current timestamp and process ID. This ensures test directories are completely isolated from any git repository.

func TempDir

func TempDir(t *testing.T, pattern string) string

TempDir creates a temporary directory for testing within the test run directory. It automatically cleans up the directory when the test completes. This replaces the use of os.MkdirTemp or t.TempDir() to ensure all test artifacts are isolated in a known location outside any git repository.

Types

This section is empty.

Jump to

Keyboard shortcuts

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