cstest

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FileNotFoundMessage = "no such file or directory"
	PathNotFoundMessage = FileNotFoundMessage // these are the same on unix.
)

Variables

This section is empty.

Functions

func AssertErrorContains

func AssertErrorContains(t *testing.T, err error, expectedErr string)

func AssertErrorMessage

func AssertErrorMessage(t *testing.T, err error, expectedErr string)

func CaptureLogs added in v0.0.20

func CaptureLogs(t *testing.T) *bytes.Buffer

CaptureLogs captures logs from the standard logger and returns a buffer.

func RequireErrorContains

func RequireErrorContains(t *testing.T, err error, expectedErr string)

func RequireErrorMessage

func RequireErrorMessage(t *testing.T, err error, expectedErr string)

func RequireLogContains

func RequireLogContains(t *testing.T, hook *logtest.Hook, expected string)

func SetAWSTestEnv added in v0.0.18

func SetAWSTestEnv(t *testing.T) string

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 SkipIfDefined(t *testing.T, envVar string)

func SkipOnWindows added in v0.0.17

func SkipOnWindows(t *testing.T)

func SkipOnWindowsBecause added in v0.0.17

func SkipOnWindowsBecause(t *testing.T, reason string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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