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.
Click to show internal directories.
Click to hide internal directories.