testhelper

package
v0.0.0-...-7fc2948 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectResources

func CollectResources[T any](ch chan T) []T

CollectResources fetches items from a channel and returns them in a slice.

Warning: this function does not wait for the channel to close, using it can cause race conditions. See CollectResourcesBlocking for a blocking version of the function.

func CollectResourcesBlocking

func CollectResourcesBlocking[T any](ch chan T) []T

CollectResourcesBlocking fetches items from a channel and returns them in a slice. This function waits for the channel to close before returning. See CollectResources for a non-blocking version of the function.

func CollectResourcesWithTimeout

func CollectResourcesWithTimeout[T any](ch chan T, maxCount int, timeout time.Duration) []T

CollectResourcesWithTimeout fetches items from a channel and returns them in a slice after no elements have been received for the specified timeout duration.

func CreateMockClients

func CreateMockClients[T any](client T, regions []string) map[string]T

func NewLogger

func NewLogger(t *testing.T) *clog.Logger

func NewObserverLogger

func NewObserverLogger(t *testing.T) *clog.Logger

func SkipLong

func SkipLong(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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