testutils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MPL-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFakeLogr added in v0.3.0

func MakeFakeLogr() *fakelogr.FakeLogger

MakeFakeLogr returns an API compliant logr object that can be used for unit testing. Without these stubs filled in, a nil pointer exception will be thrown on log.V().

Types

type K8sTestEnv

type K8sTestEnv struct {
	Client     client.Client
	DynClient  dynamic.Interface
	RestMapper *restmapper.DeferredDiscoveryRESTMapper
	Stop       func()
}

func StartK8sTestEnvironment

func StartK8sTestEnvironment() (*K8sTestEnv, error)

Starts a local k8s test environment for testing Kubernetes operations such as Create, Get, Delete, etc

Jump to

Keyboard shortcuts

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