testresource

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompleteFunc

type CompleteFunc func(fn func(runtime.Object) error, eventTypes ...watch.EventType) error

type OwnedKubeClients

type OwnedKubeClients struct {
	EnvTest    *envtest.Environment
	Rest       *rest.Config
	Scheme     *runtime.Scheme
	KubeClient *kubernetes.Clientset
	Client     client.WithWatch
}

func KubeClients

func KubeClients(tb testing.TB, kubeconfig *string) *OwnedKubeClients

func (*OwnedKubeClients) InstallCRDs

func (*OwnedKubeClients) SetupNamespace

func (k *OwnedKubeClients) SetupNamespace(tb testing.TB, ctx context.Context) (string, context.CancelFunc)

func (*OwnedKubeClients) StartObjectWatch

func (k *OwnedKubeClients) StartObjectWatch(
	tb testing.TB,
	ctx context.Context,
	object client.Object,
) CompleteFunc

StartObjectWatch starts a watch for the provided object, the returned function should be used to wait for a condition to succeed. The watch will start after calling this function. This means that the completion function can respond to events received before calling the complete function but after calling StartObjectWatch.

Jump to

Keyboard shortcuts

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