testutils

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMetricInt added in v0.80.0

func AssertMetricInt(t testing.TB, m pmetric.Metric, expectedMetric string, expectedType pmetric.MetricType, expectedValue any)

func NewClusterResourceQuota added in v0.82.0

func NewClusterResourceQuota(id string) *quotav1.ClusterResourceQuota

func NewCronJob added in v0.83.0

func NewCronJob(id string) *batchv1.CronJob

func NewDaemonset added in v0.71.0

func NewDaemonset(id string) *appsv1.DaemonSet

func NewDeployment added in v0.71.0

func NewDeployment(id string) *appsv1.Deployment

func NewEvictedTerminatedPodStatusWithContainer added in v0.85.0

func NewEvictedTerminatedPodStatusWithContainer(containerName, containerID string) *corev1.PodStatus

func NewHPA added in v0.71.0

func NewJob added in v0.71.0

func NewJob(id string) *batchv1.Job

func NewNamespace added in v0.83.0

func NewNamespace(id string) *corev1.Namespace

func NewNode added in v0.71.0

func NewNode(id string) *corev1.Node

func NewPodSpecWithContainer added in v0.71.0

func NewPodSpecWithContainer(containerName string) *corev1.PodSpec

func NewPodStatusWithContainer added in v0.71.0

func NewPodStatusWithContainer(containerName, containerID string) *corev1.PodStatus

func NewPodWithContainer added in v0.71.0

func NewPodWithContainer(id string, spec *corev1.PodSpec, status *corev1.PodStatus) *corev1.Pod

func NewReplicaSet added in v0.71.0

func NewReplicaSet(id string) *appsv1.ReplicaSet

func NewReplicationController added in v0.83.0

func NewReplicationController(id string) *corev1.ReplicationController

func NewResourceQuota added in v0.83.0

func NewResourceQuota(id string) *corev1.ResourceQuota

func NewStatefulset added in v0.83.0

func NewStatefulset(id string) *appsv1.StatefulSet

func WithOwnerReferences added in v0.71.0

func WithOwnerReferences(or []v1.OwnerReference, obj any) any

Types

type MockStore

type MockStore struct {
	cache.Store
	WantErr bool
	Cache   map[string]any
}

func (*MockStore) GetByKey

func (ms *MockStore) GetByKey(id string) (any, bool, error)

func (*MockStore) List

func (ms *MockStore) List() []any

Jump to

Keyboard shortcuts

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