testenv

package
v1.48.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testenv provides a complete disposable environment for filesystem tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(t *testing.T, root string) []string

Build retains only the caller's explicit Go toolchain/cache settings.

func Env

func Env(t *testing.T, root string) []string

Env creates disposable paths and a process environment with platform essentials.

func Set

func Set(t *testing.T, root string)

Set installs isolated paths and clears the explicit notification override. Like testing.T.Setenv, it must not be used by parallel tests.

func Values

func Values(root string) map[string]string

Values returns an allowlist suitable for child processes. It never inherits credentials or host configuration. Callers add only required executable paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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