testing

package
v0.14.10 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package testing provides a fake dynamic client that supports finalizers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewObjectTracker

func NewObjectTracker(scheme ktesting.ObjectScheme, decoder runtime.Decoder) ktesting.ObjectTracker

NewObjectTracker returns an ObjectTracker that can be used to keep track of objects for the fake clientset. Mostly useful for unit tests.

Types

type FakeDynamicClient

type FakeDynamicClient struct {
	testing.Fake
	// contains filtered or unexported fields
}

FakeDynamicClient ... Clientset implements clientset.Interface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func NewSimpleDynamicClientWithCustomListKinds

func NewSimpleDynamicClientWithCustomListKinds(scheme *runtime.Scheme, gvrToListKind map[schema.GroupVersionResource]string, objects ...runtime.Object) *FakeDynamicClient

NewSimpleDynamicClientWithCustomListKinds try not to use this. In general you want to have the scheme have the List types registered and allow the default guessing for resources match. Sometimes that doesn't work, so you can specify a custom mapping here.

func (*FakeDynamicClient) Resource

Resource ...

func (*FakeDynamicClient) Tracker

Tracker ...

Jump to

Keyboard shortcuts

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