testing

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package testing contains test helpers for adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeFactory

func MakeFactory(ctor Ctor) rt.Factory

MakeFactory creates a testing factory for our controller.Reconciler, and initializes a Reconciler using the given Ctor as part of the process.

func NewScheme

func NewScheme() *runtime.Scheme

NewScheme returns a new scheme populated with the types defined in clientSetSchemes.

func TestControllerConstructor

func TestControllerConstructor(t *testing.T, ctor adapter.ControllerConstructor, a adapter.Adapter)

TestControllerConstructor tests that a controller constructor meets our requirements.

Types

type Ctor

Ctor constructs a controller.Reconciler.

type Listers

type Listers struct {
	// contains filtered or unexported fields
}

Listers returns listers and objects filtered from those listers.

func NewListers

func NewListers(scheme *runtime.Scheme, objs []runtime.Object) Listers

NewListers returns a new instance of Listers initialized with the given objects.

func (*Listers) GetAWSSNSSourceLister

func (l *Listers) GetAWSSNSSourceLister() listersv1alpha1.AWSSNSSourceLister

GetAWSSNSSourceLister returns a Lister for AWSSNSSource objects.

func (*Listers) GetSourcesObjects

func (l *Listers) GetSourcesObjects() []runtime.Object

GetSourcesObjects returns objects from the sources API.

func (*Listers) IndexerFor

func (l *Listers) IndexerFor(obj runtime.Object) cache.Indexer

IndexerFor returns the indexer for the given object.

Jump to

Keyboard shortcuts

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