Documentation
¶
Index ¶
- Constants
- func AssertErrorContains(t *testing.T, err error, expectedErr string)
- func AssertErrorMessage(t *testing.T, err error, expectedErr string)
- func CaptureLogs(t *testing.T) *bytes.Buffer
- func RequireErrorContains(t *testing.T, err error, expectedErr string)
- func RequireErrorMessage(t *testing.T, err error, expectedErr string)
- func RequireLogContains(t *testing.T, hook *logtest.Hook, expected string)
- func SetAWSTestEnv(t *testing.T) string
- func SkipIfDefined(t *testing.T, envVar string)
- func SkipOnWindows(t *testing.T)
- func SkipOnWindowsBecause(t *testing.T, reason string)
Constants ¶
View Source
const ( // these are the same on unix. FileNotFoundMessage = "no such file or directory" PathNotFoundMessage = FileNotFoundMessage )
Variables ¶
This section is empty.
Functions ¶
func CaptureLogs ¶ added in v0.0.20
CaptureLogs captures logs from the standard logger and returns a buffer.
func RequireLogContains ¶
func SetAWSTestEnv ¶ added in v0.0.18
SetAWSTestEnv sets the environment variables required to run tests against LocalStack, including AWS credentials and the custom endpoint.
It also performs basic validation:
- Skips the test on Windows or when TEST_LOCAL_ONLY is defined.
- Fails the test if AWS_ENDPOINT_FORCE is already set (to avoid unintended overrides).
- Fails the test if the LocalStack endpoint is not reachable.
func SkipIfDefined ¶ added in v0.0.17
func SkipOnWindows ¶ added in v0.0.17
func SkipOnWindowsBecause ¶ added in v0.0.17
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.