test

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package test contains test helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNode

func NewNode(name string, opts *NewNodeOptions) *corev1.Node

NewNode returns new node instance.

func NewPod

func NewPod(namespace, name, nodeName string, opts *NewPodOptions) *corev1.Pod

NewPod used to return new pod instance.

Types

type NewNodeOptions

type NewNodeOptions struct {
	Annotations   map[string]string
	Labels        map[string]string
	Conditions    []corev1.NodeCondition
	Taints        []corev1.Taint
	Unschedulable bool
}

NewNodeOptions store NewNode options.

type NewPodOptions

type NewPodOptions struct {
	CreationTimestamp metav1.Time
	Annotations       map[string]string
	Labels            map[string]string
	Phase             corev1.PodPhase
	Reason            string
	ContainerStatuses []corev1.ContainerStatus
	Resources         corev1.ResourceRequirements
	NodeSelector      map[string]string
	Tolerations       []corev1.Toleration
	Affinity          corev1.Affinity
}

NewPodOptions store NewPod options.

Jump to

Keyboard shortcuts

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