configtest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KnownLeakEnvironmentKeys = []string{
	snykAPIKey,
}

KnownLeakEnvironmentKeys is cleared when IsolateEnvironmentForTest is called with no arguments.

Functions

func IsolateEnvironmentForTest

func IsolateEnvironmentForTest(t *testing.T, keys ...string)

IsolateEnvironmentForTest clears environment variables for a test using t.Setenv(k, ""). If no keys are provided, it clears the variables listed in KnownLeakEnvironmentKeys. If explicit keys are provided, they OVERRIDE the default behavior: only the specified keys are cleared, and they are NOT merged with KnownLeakEnvironmentKeys. Empty keys are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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