testing

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 AssertEvents

func AssertEvents(t *testing.T, testCase string, expectedEvents []string, realEvents chan string)

AssertEvents verifies when the test run iniates expected events

func FooBar

func FooBar() map[string]string

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

func NewBareMetalHost

func NewBareMetalHost(name string, online bool, powerOn bool) *bmov1.BareMetalHost

NewBareMetalHost returns new bare metal host object that can be used for testing

func NewInfrastructure

func NewInfrastructure(name string, platform osconfigv1.PlatformType) *osconfigv1.Infrastructure

NewInfrastructure returns a new Infrastructure object that can be used for testing

func NewMachine

func NewMachine(name string, nodeName string, bareMetalHostName string) *mapiv1.Machine

NewMachine returns new machine object that can be used for testing

func NewMachineHealthCheck

func NewMachineHealthCheck(name string) *maov1.MachineHealthCheck

NewMachineHealthCheck returns new MachineHealthCheck object that can be used for testing

func NewMachineRemediation

func NewMachineRemediation(name string, machineName string, remediationType mrv1.RemediationType, remediationState mrv1.RemediationState) *mrv1.MachineRemediation

NewMachineRemediation returns new machine remediation object that can be used for testing

func NewNode

func NewNode(name string, ready bool, machineName string) *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

func NewUnhealthyConditionsConfigMap

func NewUnhealthyConditionsConfigMap(name string, data string) *corev1.ConfigMap

NewUnhealthyConditionsConfigMap returns new config map object with unhealthy conditions

Types

This section is empty.

Jump to

Keyboard shortcuts

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