1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/vendor/gotest.tools/env/example_test.go

18 lines
333 B
Go

package env
import "testing"
var t = &testing.T{}
// Patch an environment variable and defer to return to the previous state
func ExamplePatch() {
defer Patch(t, "PATH", "/custom/path")()
}
// Patch all environment variables
func ExamplePatchAll() {
defer PatchAll(t, map[string]string{
"ONE": "FOO",
"TWO": "BAR",
})()
}