testenv

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package testenv provides environment isolation helpers for tests. This package intentionally has no dependencies on other internal packages to avoid import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDataDir

func SetDataDir(t *testing.T) string

SetDataDir sets ROBOREV_DATA_DIR to a temp directory to isolate tests from production ~/.roborev. This is preferred over setting HOME because ROBOREV_DATA_DIR takes precedence in config.DataDir(). Returns the temp directory path. Cleanup is automatic via t.Setenv.

Note: t.Setenv marks the test as incompatible with t.Parallel(), which is appropriate since environment variables are process-global state.

Types

This section is empty.

Jump to

Keyboard shortcuts

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