testutils

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureStdout added in v0.8.0

func CaptureStdout(f func()) string

CaptureStdout executes a function and returns its standard output as a string. If the function takes longer than 30 seconds to complete, it returns an empty string.

func CheckExpectedError

func CheckExpectedError(t *testing.T, err error, errMessagePattern *string)

func CreateX509Certificate added in v0.5.0

func CreateX509Certificate() (string, error)

func GetClientInfo added in v0.5.0

func GetClientInfo(t *testing.T) *connector.ClientInfo

func ValidateImportBlockSubset added in v0.5.0

func ValidateImportBlockSubset(t *testing.T, resource connector.ExportableResource, expectedImportBlocks *[]connector.ImportBlock)

Similar to ValidateImportBlocks, but only checks if the expectedImportBlocks are a subset of the actual import blocks. This is useful for resources that have pre-configured resources that are not created by the test.

func ValidateImportBlocks

func ValidateImportBlocks(t *testing.T, resource connector.ExportableResource, expectedImportBlocks *[]connector.ImportBlock)

func WriteStringToPipe

func WriteStringToPipe(t *testing.T, str string) (reader *os.File)

Get os.File with string written to it. The caller is responsible for closing the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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