testing

package
v0.2.1-0...-d19bdda Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Namespace contains the default namespace for machine-api components
	Namespace = "openshift-machine-api"
	// MachineAnnotationKey contains default machine node annotation
	MachineAnnotationKey = "machine.openshift.io/machine"
)

Variables

View Source
var (
	// KnownDate contains date that can be used under tests
	KnownDate = metav1.Time{Time: time.Date(1985, 06, 03, 0, 0, 0, 0, time.Local)}
)

Functions

func FooBar

func FooBar() map[string]string

FooBar returns foo:bar map that can be used as default label

func IsRetryableAPIError

func IsRetryableAPIError(err error) bool

IsRetryableAPIError returns whether an API error is retryable or not. inspired by: k8s.io/kubernetes/test/utils.

func NewDefaultMutableFeatureGate

func NewDefaultMutableFeatureGate() (featuregate.MutableFeatureGate, error)

func NewExternalRemediationMachine

func NewExternalRemediationMachine() *unstructured.Unstructured

func NewExternalRemediationTemplate

func NewExternalRemediationTemplate() *unstructured.Unstructured

func NewMachine

func NewMachine(name string, nodeName string) *machinev1.Machine

NewMachine returns new machine object that can be used for testing

func NewMachineHealthCheck

func NewMachineHealthCheck(name string) *machinev1.MachineHealthCheck

NewMachineHealthCheck returns new MachineHealthCheck object that can be used for testing

func NewNode

func NewNode(name string, ready bool) *corev1.Node

NewNode returns new node object that can be used for testing

func NewSelector

func NewSelector(labels map[string]string) *metav1.LabelSelector

NewSelector returns new LabelSelector

func NewSelectorFooBar

func NewSelectorFooBar() *metav1.LabelSelector

NewSelectorFooBar returns new foo:bar label selector

Types

This section is empty.

Jump to

Keyboard shortcuts

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