Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v1.300074.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConf

func GetConf(t *testing.T, path string) *confmap.Conf

func GetConfWithOverrides added in v1.300034.0

func GetConfWithOverrides(t *testing.T, path string, overrides map[string]any) *confmap.Conf

func GetJson

func GetJson(t *testing.T, path string) map[string]interface{}

func IsolateAWSSharedConfigEnv added in v1.300074.0

func IsolateAWSSharedConfigEnv(t *testing.T) string

IsolateAWSSharedConfigEnv makes SDK region and profile lookups deterministic: the shared credentials and config files are pointed at nonexistent paths under a temp dir, and every env var that supplies a region or profile is cleared. Returns the temp dir. Use this rather than HOME, which translator/util.CheckAndSetHomeDir overwrites.

func SharedConfigPath added in v1.300074.0

func SharedConfigPath(dir string) string

SharedConfigPath returns the shared-config file path that IsolateAWSSharedConfigEnv points the SDK at. The file does not exist unless a test creates it.

func SharedCredentialsPath added in v1.300074.0

func SharedCredentialsPath(dir string) string

SharedCredentialsPath returns the shared-credentials file path that IsolateAWSSharedConfigEnv points the SDK at. The file does not exist unless a test creates it, which is how a test exercises the SDK default-file path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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