setup

package
v0.22.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddToManager

type AddToManager func(mgr manager.Manager)

type IntegrationTestEnv

type IntegrationTestEnv struct {
	K8sClient  client.Client
	RestConfig *rest.Config
	Logger     logr.Logger

	TestNs *corev1.Namespace
	// contains filtered or unexported fields
}

func NewIntegrationTestEnv

func NewIntegrationTestEnv(namespacePrefix string, loggerName string, crdDirectoryPaths []string) *IntegrationTestEnv

NewIntegrationTestEnv creates a new integration test environment. It will do the following: 1. It will set the scheme 2. It will create a kubebuilder envtest environment which in turn will provide rest.Config, k8s client. 3. Creates a test namespace that will be used by all the tests. 4. Creates a controller manager Sets up deferred cleanup of all the above resources which will be cleaned up when the test suit completes.

func (*IntegrationTestEnv) RegisterReconcilers

func (e *IntegrationTestEnv) RegisterReconcilers(addToMgrFn AddToManager) *IntegrationTestEnv

RegisterReconcilers allows consumers to register one or more reconcilers to the controller manager passed via the callback function AddToManager.

func (*IntegrationTestEnv) StartManager

func (e *IntegrationTestEnv) StartManager() *IntegrationTestEnv

StartManager starts controller manager.

Jump to

Keyboard shortcuts

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