fake

package
v0.7.12 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 13 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-capv-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"

	// Clusterv1a2Name is the name of the fake CAPI v1alpha3 Cluster resource.
	Clusterv1a2Name = "fake-cluster"

	// Clusterv1a2UUID is the UID of the fake CAPI v1alpha3 Cluster resource.
	Clusterv1a2UUID = "00000000-0000-0000-0000-000000000000"

	// Machinev1a2Name is the name of the fake CAPI v1alpha3 Machine resource.
	Machinev1a2Name = "fake-machine"

	// Machinev1a2UUID is the UID of the fake CAPI v1alpha3 Machine resource.
	Machinev1a2UUID = "00000000-0000-0000-0000-000000000001"

	// VSphereClusterUUID is the UID of the fake VSphereCluster resource.
	VSphereClusterUUID = "10000000-0000-0000-0000-000000000000"

	// VSphereMachineUUID is the UID of the fake VSphereMachine resource.
	VSphereMachineUUID = "10000000-0000-0000-0000-000000000001"

	// VSphereVMName is the name of the fake VSphereVM resource.
	VSphereVMName = "fake-vm"

	// VSphereVMUUID is the UID of the fake VSphereVMUUID resource.
	VSphereVMUUID = "20000000-0000-0000-0000-000000000002"

	// PodCIDR is the CIDR for the pod network.
	PodCIDR = "1.0.0.0/16"

	// ServiceCIDR is the CIDR for the service network.
	ServiceCIDR = "2.0.0.0/16"
)

Variables

This section is empty.

Functions

func NewClusterContext

func NewClusterContext(ctx *context.ControllerContext) *context.ClusterContext

NewClusterContext returns a fake ClusterContext for unit testing reconcilers with a fake client.

func NewControllerContext

func NewControllerContext(ctx *context.ControllerManagerContext) *context.ControllerContext

NewControllerContext returns a fake ControllerContext for unit testing reconcilers with a fake client.

func NewControllerManagerContext

func NewControllerManagerContext(initObjects ...runtime.Object) *context.ControllerManagerContext

NewControllerManagerContext returns a fake ControllerManagerContext for unit testing reconcilers and webhooks with a fake client. You can choose to initialize it with a slice of runtime.Object.

func NewMachineContext

func NewMachineContext(ctx *context.ClusterContext) *context.MachineContext

NewMachineContext returns a fake MachineContext for unit testing reconcilers with a fake client.

func NewVMContext added in v0.6.0

func NewVMContext(ctx *context.ControllerContext) *context.VMContext

NewVMContext returns a fake VMContext for unit testing reconcilers 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