testutils

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadSamples

func LoadSamples(manifest string) []runtime.Object

func NewFakeClientSetWithSamples

func NewFakeClientSetWithSamples(manifest string) (*fake.Clientset, []runtime.Object)

func NewFakeCluster

func NewFakeCluster(clusterName string, status ekstypes.ClusterStatus) *ekstypes.Cluster

NewFakeCluster creates a new fake cluster to be used in the tests

func RegisterAndRun

func RegisterAndRun(t *testing.T)

RegisterAndRun sets up and runs Ginkgo tests

Types

type CollectionTracker

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

func NewCollectionTracker

func NewCollectionTracker() *CollectionTracker

func (*CollectionTracker) AllTracked

func (c *CollectionTracker) AllTracked() map[string]runtime.Object

func (*CollectionTracker) AllTrackedItems

func (c *CollectionTracker) AllTrackedItems() (items []runtime.Object)

func (*CollectionTracker) Created

func (c *CollectionTracker) Created() map[string]runtime.Object

func (*CollectionTracker) CreatedItems

func (c *CollectionTracker) CreatedItems() (items []runtime.Object)

func (*CollectionTracker) Deleted

func (c *CollectionTracker) Deleted() map[string]runtime.Object

func (*CollectionTracker) DeletedItems

func (c *CollectionTracker) DeletedItems() (items []runtime.Object)

func (*CollectionTracker) Updated

func (c *CollectionTracker) Updated() map[string]runtime.Object

func (*CollectionTracker) UpdatedItems

func (c *CollectionTracker) UpdatedItems() (items []runtime.Object)

type FakeRawClient

type FakeRawClient struct {
	Collection                 *CollectionTracker
	ExistingClientSet          kubernetes.Interface
	AssumeObjectsMissing       bool
	ClientSetUseUpdatedObjects bool
	UseUnionTracker            bool
}

func NewFakeRawClient

func NewFakeRawClient() *FakeRawClient

func NewFakeRawClientWithSamples added in v0.75.0

func NewFakeRawClientWithSamples(sample string) *FakeRawClient

func (*FakeRawClient) ClearUpdated

func (c *FakeRawClient) ClearUpdated()

func (*FakeRawClient) ClientSet

func (c *FakeRawClient) ClientSet() kubeclient.Interface

func (*FakeRawClient) NewRawResource

func (c *FakeRawClient) NewRawResource(object runtime.Object) (*kubernetes.RawResource, error)

type RequestTracker

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

func NewFakeRawResource

func NewFakeRawResource(item runtime.Object, missing, unionised bool, ct *CollectionTracker) (*kubernetes.RawResource, RequestTracker)

func (*RequestTracker) Append

func (t *RequestTracker) Append(req *http.Request)

func (*RequestTracker) Create

func (t *RequestTracker) Create(req *http.Request, item runtime.Object) bool

func (*RequestTracker) Delete

func (t *RequestTracker) Delete(req *http.Request, item runtime.Object) bool

func (*RequestTracker) IsMissing

func (t *RequestTracker) IsMissing(req *http.Request, item runtime.Object) bool

func (*RequestTracker) Methods

func (t *RequestTracker) Methods() (m []string)

func (*RequestTracker) Update

func (t *RequestTracker) Update(req *http.Request, item runtime.Object)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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