test

package
v0.15.25 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package test provides test utilities for the Syncer.

Index

Constants

View Source
const (
	RemoteNamespace = "remote-ns"
	LocalNamespace  = "local-ns"
)

Variables

This section is empty.

Functions

func AwaitAndVerifyResource

func AwaitAndVerifyResource(client dynamic.ResourceInterface, name string,
	verify func(*unstructured.Unstructured) bool,
) *unstructured.Unstructured

func AwaitNoResource

func AwaitNoResource(client dynamic.ResourceInterface, name string)

func AwaitResource

func AwaitResource(client dynamic.ResourceInterface, name string) *unstructured.Unstructured

func CreateResource

func CreateResource(resourceInterface dynamic.ResourceInterface, resource runtime.Object) *unstructured.Unstructured

func GetGroupVersionKindFor

func GetGroupVersionKindFor(obj runtime.Object) schema.GroupVersionKind

func GetGroupVersionResourceFor

func GetGroupVersionResourceFor(restMapper metaapi.RESTMapper, obj runtime.Object) *schema.GroupVersionResource

func GetPod

func GetPod(resourceInterface dynamic.ResourceInterface, from *corev1.Pod) *corev1.Pod

func GetRESTMapperAndGroupVersionResourceFor

func GetRESTMapperAndGroupVersionResourceFor(obj runtime.Object) (metaapi.RESTMapper, *schema.GroupVersionResource)

func GetRESTMapperFor

func GetRESTMapperFor(objs ...runtime.Object) metaapi.RESTMapper

func GetResource

func GetResource(resourceInterface dynamic.ResourceInterface, obj runtime.Object) *unstructured.Unstructured

func GetResourceAndError

func GetResourceAndError(resourceInterface dynamic.ResourceInterface, obj runtime.Object) (*unstructured.Unstructured, error)

func NewPod

func NewPod(namespace string) *corev1.Pod

func NewPodWithImage

func NewPodWithImage(namespace, imageName string) *corev1.Pod

func PrepInitialClientObjs

func PrepInitialClientObjs(namespace, clusterID string, initObjs ...runtime.Object) []runtime.Object

func SetClusterIDLabel

func SetClusterIDLabel(obj runtime.Object, clusterID string) runtime.Object

func ToUnstructured

func ToUnstructured(obj runtime.Object) *unstructured.Unstructured

func UpdateResource

func UpdateResource(resourceInterface dynamic.ResourceInterface, resource runtime.Object) *unstructured.Unstructured

func VerifyResource

func VerifyResource(resourceInterface dynamic.ResourceInterface, expected *corev1.Pod, expNamespace, clusterID string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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