testutil

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEvents

func AssertEvents(events chan string, expected map[string]int)

AssertEvents asserts that the expected events were recorded in the events channel.

func EnsureNoEvents

func EnsureNoEvents(events chan string)

EnsureNoEvents ensures that all events are consumed from the events channel.

func ReconcileStatefulSets

func ReconcileStatefulSets[T interface {
	SpecificName() string
}](ctx context.Context, cr T, suite TestSuit)

ReconcileStatefulSets updates the status of all StatefulSets associated with the given Cluster.

Types

type TestSuit

type TestSuit struct {
	TestEnv *envtest.Environment
	Cfg     *rest.Config
	Client  client.Client
	Log     controllerutil.Logger
}

TestSuit encapsulates the testing environment and utilities.

func SetupEnvironment

func SetupEnvironment(addToScheme func(*k8sruntime.Scheme) error) TestSuit

SetupEnvironment initializes the test environment, including the Kubernetes API server and etcd.

Jump to

Keyboard shortcuts

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