testutils

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupTestingEnv

func CleanupTestingEnv(env *envtest.Environment) error

func GetErrMetricCount

func GetErrMetricCount(t *testing.T, controllerName controllername.ControllerNamer) float64

func GetReconcileMetricCount

func GetReconcileMetricCount(t *testing.T, controllerName controllername.ControllerNamer, label string) float64

func StartTestingEnv

func StartTestingEnv() (*rest.Config, *envtest.Environment, error)

Types

type FakeManager

type FakeManager struct {
	Client     client.Client
	HttpClient *http.Client
	Scheme     *runtime.Scheme
	AddFn      func(runnable manager.Runnable) error
}

func (*FakeManager) Add

func (f *FakeManager) Add(runnable manager.Runnable) error

Add implements manager.Manager.

func (*FakeManager) AddHealthzCheck

func (f *FakeManager) AddHealthzCheck(name string, check healthz.Checker) error

AddHealthzCheck implements manager.Manager.

func (*FakeManager) AddMetricsExtraHandler

func (f *FakeManager) AddMetricsExtraHandler(path string, handler http.Handler) error

AddMetricsExtraHandler implements manager.Manager.

func (*FakeManager) AddReadyzCheck

func (f *FakeManager) AddReadyzCheck(name string, check healthz.Checker) error

AddReadyzCheck implements manager.Manager.

func (*FakeManager) Elected

func (f *FakeManager) Elected() <-chan struct{}

Elected implements manager.Manager.

func (*FakeManager) GetAPIReader

func (f *FakeManager) GetAPIReader() client.Reader

GetAPIReader implements manager.Manager.

func (*FakeManager) GetCache

func (f *FakeManager) GetCache() cache.Cache

GetCache implements manager.Manager.

func (*FakeManager) GetClient

func (f *FakeManager) GetClient() client.Client

GetClient implements manager.Manager.

func (*FakeManager) GetConfig

func (f *FakeManager) GetConfig() *rest.Config

GetConfig implements manager.Manager.

func (*FakeManager) GetControllerOptions

func (f *FakeManager) GetControllerOptions() config.Controller

GetControllerOptions implements manager.Manager.

func (*FakeManager) GetEventRecorderFor

func (f *FakeManager) GetEventRecorderFor(name string) record.EventRecorder

GetEventRecorderFor implements manager.Manager.

func (*FakeManager) GetFieldIndexer

func (f *FakeManager) GetFieldIndexer() client.FieldIndexer

GetFieldIndexer implements manager.Manager.

func (*FakeManager) GetHTTPClient added in v0.0.4

func (f *FakeManager) GetHTTPClient() *http.Client

func (*FakeManager) GetLogger

func (f *FakeManager) GetLogger() logr.Logger

GetLogger implements manager.Manager.

func (*FakeManager) GetRESTMapper

func (f *FakeManager) GetRESTMapper() meta.RESTMapper

GetRESTMapper implements manager.Manager.

func (*FakeManager) GetScheme

func (f *FakeManager) GetScheme() *runtime.Scheme

GetScheme implements manager.Manager.

func (*FakeManager) GetWebhookServer

func (f *FakeManager) GetWebhookServer() webhook.Server

GetWebhookServer implements manager.Manager.

func (*FakeManager) SetFields

func (f *FakeManager) SetFields(interface{}) error

SetFields implements manager.Manager.

func (*FakeManager) Start

func (f *FakeManager) Start(ctx context.Context) error

Start implements manager.Manager.

Jump to

Keyboard shortcuts

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