fake

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerName is the name of the fake controller.
	ControllerName = "fake-controller"

	// ControllerManagerName is the name of the fake controller manager.
	ControllerManagerName = "fake-controller-manager"

	// ControllerManagerNamespace is the name of the namespace in which the
	// fake controller manager's resources are located.
	ControllerManagerNamespace = "fake-vmoperator-system"

	// LeaderElectionNamespace is the namespace used to control leader election
	// for the fake controller manager.
	LeaderElectionNamespace = ControllerManagerNamespace

	// LeaderElectionID is the name of the ID used to control leader election
	// for the fake controller manager.
	LeaderElectionID = ControllerManagerName + "-runtime"

	// Namespace is the fake namespace.
	Namespace = "default"

	// WebhookName is the name of the fake webhook.
	WebhookName = "fake-webhook"

	// ServiceAccountName is fake service account name.
	ServiceAccountName = "fake-service-account"
)

Variables

This section is empty.

Functions

func NewControllerManagerContext

func NewControllerManagerContext() *context.ControllerManagerContext

NewControllerManagerContext returns a fake ControllerManagerContext for unit testing reconcilers and webhooks with a fake client.

func NewWebhookContext

func NewWebhookContext(ctx *context.ControllerManagerContext) *context.WebhookContext

NewWebhookContext returns a fake WebhookContext for unit testing webhooks with a fake client.

func NewWebhookRequestContext

func NewWebhookRequestContext(ctx *context.WebhookContext, obj, oldObj *unstructured.Unstructured) *context.WebhookRequestContext

NewWebhookRequestContext returns a fake WebhookRequestContext for unit testing webhooks with a fake client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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