testing

package
v0.0.0-...-91a9a81 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppNamespace

func NewAppNamespace(name string) *corev1.Namespace

func NewEventActivation

func NewEventActivation(ns, name string) *v1alpha1.EventActivation

func NewFakeClients

func NewFakeClients(objs ...runtime.Object) (*istiofake.Clientset, *eaFake.Clientset)

NewFakeClients initializes fake Clientsets with an optional list of API objects.

func NewScheme

func NewScheme() *runtime.Scheme

Types

type ActionRecorder

type ActionRecorder interface {
	Actions() []clientgotesting.Action
}

ActionRecorder contains list of K8s request actions.

type ActionRecorderList

type ActionRecorderList []ActionRecorder

ActionRecorderList is a list of ActionRecorder objects.

func (ActionRecorderList) ActionsByVerb

func (l ActionRecorderList) ActionsByVerb() (Actions, error)

ActionsByVerb fills in Actions objects, sorting the actions by verb.

type Actions

Actions stores list of Actions recorded by the reactors.

type ActionsAsserter

type ActionsAsserter struct {
	Actions
}

func NewActionsAsserter

func NewActionsAsserter(t *testing.T, clis ...ActionRecorder) *ActionsAsserter

func (*ActionsAsserter) AssertCreates

func (a *ActionsAsserter) AssertCreates(t *testing.T, expect []runtime.Object)

func (*ActionsAsserter) AssertDeletes

func (a *ActionsAsserter) AssertDeletes(t *testing.T, expect []string)

func (*ActionsAsserter) AssertUpdates

func (a *ActionsAsserter) AssertUpdates(t *testing.T, expect []runtime.Object)

type Listers

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

func NewListers

func NewListers(objs []runtime.Object) Listers

func (*Listers) GetEAObjects

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

func (*Listers) GetIstioObjects

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

func (*Listers) GetKubeObjects

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

type ObjectSorter

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

func NewObjectSorter

func NewObjectSorter(scheme *runtime.Scheme) ObjectSorter

func (*ObjectSorter) AddObjects

func (o *ObjectSorter) AddObjects(objs ...runtime.Object)

func (*ObjectSorter) IndexerForObjectType

func (o *ObjectSorter) IndexerForObjectType(obj runtime.Object) cache.Indexer

func (*ObjectSorter) ObjectsForScheme

func (o *ObjectSorter) ObjectsForScheme(scheme *runtime.Scheme) []runtime.Object

func (*ObjectSorter) ObjectsForSchemeFunc

func (o *ObjectSorter) ObjectsForSchemeFunc(funcs ...func(scheme *runtime.Scheme) error) []runtime.Object

Jump to

Keyboard shortcuts

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