Documentation
¶
Index ¶
- func AssertEvents(events chan string, expected map[string]int)
- func CompleteVersionProbeJob(ctx context.Context, suite TestSuit, namespace, specificName, version string)
- func EnsureNoEvents(events chan string)
- func NewSpecFiller(data []byte) *randfill.Filler
- func ReconcileStatefulSets[T interface{ ... }](ctx context.Context, cr T, suite TestSuit)
- type TestSuit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEvents ¶
AssertEvents asserts that the expected events were recorded in the events channel.
func CompleteVersionProbeJob ¶ added in v0.0.4
func CompleteVersionProbeJob(ctx context.Context, suite TestSuit, namespace, specificName, version string)
CompleteVersionProbeJob finds the version probe Job for the given cluster and simulates its successful completion by marking the Job as Complete and creating a Pod with the expected termination message.
func EnsureNoEvents ¶
func EnsureNoEvents(events chan string)
EnsureNoEvents ensures that all events are consumed from the events channel.
func NewSpecFiller ¶ added in v0.0.3
NewSpecFiller creates a new randfill.Filler from go-fuzz data, with custom functions to handle specific fields that require special handling.
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.