mocks

package
v3.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterCache

type ClusterCache struct {
	mock.Mock
}

ClusterCache is an autogenerated mock type for the ClusterCache type

func NewClusterCache

func NewClusterCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *ClusterCache

NewClusterCache creates a new instance of ClusterCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ClusterCache) EXPECT

func (_m *ClusterCache) EXPECT() *ClusterCache_Expecter

func (*ClusterCache) EnsureSynced

func (_mock *ClusterCache) EnsureSynced() error

EnsureSynced provides a mock function for the type ClusterCache

func (*ClusterCache) FindResources

func (_mock *ClusterCache) FindResources(namespace string, predicates ...func(r *cache.Resource) bool) map[kube.ResourceKey]*cache.Resource

FindResources provides a mock function for the type ClusterCache

func (*ClusterCache) GetAPIResources

func (_mock *ClusterCache) GetAPIResources() []kube.APIResourceInfo

GetAPIResources provides a mock function for the type ClusterCache

func (*ClusterCache) GetClusterInfo

func (_mock *ClusterCache) GetClusterInfo() cache.ClusterInfo

GetClusterInfo provides a mock function for the type ClusterCache

func (*ClusterCache) GetGVKParser

func (_mock *ClusterCache) GetGVKParser() *managedfields.GvkParser

GetGVKParser provides a mock function for the type ClusterCache

func (*ClusterCache) GetManagedLiveObjs

func (_mock *ClusterCache) GetManagedLiveObjs(targetObjs []*unstructured.Unstructured, isManaged func(r *cache.Resource) bool) (map[kube.ResourceKey]*unstructured.Unstructured, error)

GetManagedLiveObjs provides a mock function for the type ClusterCache

func (*ClusterCache) GetOpenAPISchema

func (_mock *ClusterCache) GetOpenAPISchema() openapi.Resources

GetOpenAPISchema provides a mock function for the type ClusterCache

func (*ClusterCache) GetServerVersion

func (_mock *ClusterCache) GetServerVersion() string

GetServerVersion provides a mock function for the type ClusterCache

func (*ClusterCache) Invalidate

func (_mock *ClusterCache) Invalidate(opts ...cache.UpdateSettingsFunc)

Invalidate provides a mock function for the type ClusterCache

func (*ClusterCache) IsNamespaced

func (_mock *ClusterCache) IsNamespaced(gk schema.GroupKind) (bool, error)

IsNamespaced provides a mock function for the type ClusterCache

func (*ClusterCache) IterateHierarchyV2

func (_mock *ClusterCache) IterateHierarchyV2(keys []kube.ResourceKey, action func(resource *cache.Resource, namespaceResources map[kube.ResourceKey]*cache.Resource) bool)

IterateHierarchyV2 provides a mock function for the type ClusterCache

func (*ClusterCache) OnEvent

func (_mock *ClusterCache) OnEvent(handler cache.OnEventHandler) cache.Unsubscribe

OnEvent provides a mock function for the type ClusterCache

func (*ClusterCache) OnProcessEventsHandler

func (_mock *ClusterCache) OnProcessEventsHandler(handler cache.OnProcessEventsHandler) cache.Unsubscribe

OnProcessEventsHandler provides a mock function for the type ClusterCache

func (*ClusterCache) OnResourceUpdated

func (_mock *ClusterCache) OnResourceUpdated(handler cache.OnResourceUpdatedHandler) cache.Unsubscribe

OnResourceUpdated provides a mock function for the type ClusterCache

type ClusterCache_EnsureSynced_Call

type ClusterCache_EnsureSynced_Call struct {
	*mock.Call
}

ClusterCache_EnsureSynced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureSynced'

func (*ClusterCache_EnsureSynced_Call) Return

func (*ClusterCache_EnsureSynced_Call) Run

func (*ClusterCache_EnsureSynced_Call) RunAndReturn

type ClusterCache_Expecter

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

func (*ClusterCache_Expecter) EnsureSynced

EnsureSynced is a helper method to define mock.On call

func (*ClusterCache_Expecter) FindResources

func (_e *ClusterCache_Expecter) FindResources(namespace any, predicates ...any) *ClusterCache_FindResources_Call

FindResources is a helper method to define mock.On call

  • namespace string
  • predicates ...func(r *cache.Resource) bool

func (*ClusterCache_Expecter) GetAPIResources

GetAPIResources is a helper method to define mock.On call

func (*ClusterCache_Expecter) GetClusterInfo

GetClusterInfo is a helper method to define mock.On call

func (*ClusterCache_Expecter) GetGVKParser

GetGVKParser is a helper method to define mock.On call

func (*ClusterCache_Expecter) GetManagedLiveObjs

func (_e *ClusterCache_Expecter) GetManagedLiveObjs(targetObjs any, isManaged any) *ClusterCache_GetManagedLiveObjs_Call

GetManagedLiveObjs is a helper method to define mock.On call

  • targetObjs []*unstructured.Unstructured
  • isManaged func(r *cache.Resource) bool

func (*ClusterCache_Expecter) GetOpenAPISchema

GetOpenAPISchema is a helper method to define mock.On call

func (*ClusterCache_Expecter) GetServerVersion

GetServerVersion is a helper method to define mock.On call

func (*ClusterCache_Expecter) Invalidate

func (_e *ClusterCache_Expecter) Invalidate(opts ...any) *ClusterCache_Invalidate_Call

Invalidate is a helper method to define mock.On call

  • opts ...cache.UpdateSettingsFunc

func (*ClusterCache_Expecter) IsNamespaced

IsNamespaced is a helper method to define mock.On call

  • gk schema.GroupKind

func (*ClusterCache_Expecter) IterateHierarchyV2

func (_e *ClusterCache_Expecter) IterateHierarchyV2(keys any, action any) *ClusterCache_IterateHierarchyV2_Call

IterateHierarchyV2 is a helper method to define mock.On call

  • keys []kube.ResourceKey
  • action func(resource *cache.Resource, namespaceResources map[kube.ResourceKey]*cache.Resource) bool

func (*ClusterCache_Expecter) OnEvent

func (_e *ClusterCache_Expecter) OnEvent(handler any) *ClusterCache_OnEvent_Call

OnEvent is a helper method to define mock.On call

  • handler cache.OnEventHandler

func (*ClusterCache_Expecter) OnProcessEventsHandler

func (_e *ClusterCache_Expecter) OnProcessEventsHandler(handler any) *ClusterCache_OnProcessEventsHandler_Call

OnProcessEventsHandler is a helper method to define mock.On call

  • handler cache.OnProcessEventsHandler

func (*ClusterCache_Expecter) OnResourceUpdated

func (_e *ClusterCache_Expecter) OnResourceUpdated(handler any) *ClusterCache_OnResourceUpdated_Call

OnResourceUpdated is a helper method to define mock.On call

  • handler cache.OnResourceUpdatedHandler

type ClusterCache_FindResources_Call

type ClusterCache_FindResources_Call struct {
	*mock.Call
}

ClusterCache_FindResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindResources'

func (*ClusterCache_FindResources_Call) Return

func (*ClusterCache_FindResources_Call) Run

func (_c *ClusterCache_FindResources_Call) Run(run func(namespace string, predicates ...func(r *cache.Resource) bool)) *ClusterCache_FindResources_Call

func (*ClusterCache_FindResources_Call) RunAndReturn

func (_c *ClusterCache_FindResources_Call) RunAndReturn(run func(namespace string, predicates ...func(r *cache.Resource) bool) map[kube.ResourceKey]*cache.Resource) *ClusterCache_FindResources_Call

type ClusterCache_GetAPIResources_Call

type ClusterCache_GetAPIResources_Call struct {
	*mock.Call
}

ClusterCache_GetAPIResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAPIResources'

func (*ClusterCache_GetAPIResources_Call) Return

func (*ClusterCache_GetAPIResources_Call) Run

func (*ClusterCache_GetAPIResources_Call) RunAndReturn

type ClusterCache_GetClusterInfo_Call

type ClusterCache_GetClusterInfo_Call struct {
	*mock.Call
}

ClusterCache_GetClusterInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClusterInfo'

func (*ClusterCache_GetClusterInfo_Call) Return

func (*ClusterCache_GetClusterInfo_Call) Run

func (*ClusterCache_GetClusterInfo_Call) RunAndReturn

type ClusterCache_GetGVKParser_Call

type ClusterCache_GetGVKParser_Call struct {
	*mock.Call
}

ClusterCache_GetGVKParser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGVKParser'

func (*ClusterCache_GetGVKParser_Call) Return

func (*ClusterCache_GetGVKParser_Call) Run

func (*ClusterCache_GetGVKParser_Call) RunAndReturn

type ClusterCache_GetManagedLiveObjs_Call

type ClusterCache_GetManagedLiveObjs_Call struct {
	*mock.Call
}

ClusterCache_GetManagedLiveObjs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManagedLiveObjs'

func (*ClusterCache_GetManagedLiveObjs_Call) Return

func (*ClusterCache_GetManagedLiveObjs_Call) Run

func (*ClusterCache_GetManagedLiveObjs_Call) RunAndReturn

type ClusterCache_GetOpenAPISchema_Call

type ClusterCache_GetOpenAPISchema_Call struct {
	*mock.Call
}

ClusterCache_GetOpenAPISchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOpenAPISchema'

func (*ClusterCache_GetOpenAPISchema_Call) Return

func (*ClusterCache_GetOpenAPISchema_Call) Run

func (*ClusterCache_GetOpenAPISchema_Call) RunAndReturn

type ClusterCache_GetServerVersion_Call

type ClusterCache_GetServerVersion_Call struct {
	*mock.Call
}

ClusterCache_GetServerVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServerVersion'

func (*ClusterCache_GetServerVersion_Call) Return

func (*ClusterCache_GetServerVersion_Call) Run

func (*ClusterCache_GetServerVersion_Call) RunAndReturn

type ClusterCache_Invalidate_Call

type ClusterCache_Invalidate_Call struct {
	*mock.Call
}

ClusterCache_Invalidate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Invalidate'

func (*ClusterCache_Invalidate_Call) Return

func (*ClusterCache_Invalidate_Call) Run

func (*ClusterCache_Invalidate_Call) RunAndReturn

type ClusterCache_IsNamespaced_Call

type ClusterCache_IsNamespaced_Call struct {
	*mock.Call
}

ClusterCache_IsNamespaced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsNamespaced'

func (*ClusterCache_IsNamespaced_Call) Return

func (*ClusterCache_IsNamespaced_Call) Run

func (*ClusterCache_IsNamespaced_Call) RunAndReturn

type ClusterCache_IterateHierarchyV2_Call

type ClusterCache_IterateHierarchyV2_Call struct {
	*mock.Call
}

ClusterCache_IterateHierarchyV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IterateHierarchyV2'

func (*ClusterCache_IterateHierarchyV2_Call) Return

func (*ClusterCache_IterateHierarchyV2_Call) Run

func (_c *ClusterCache_IterateHierarchyV2_Call) Run(run func(keys []kube.ResourceKey, action func(resource *cache.Resource, namespaceResources map[kube.ResourceKey]*cache.Resource) bool)) *ClusterCache_IterateHierarchyV2_Call

func (*ClusterCache_IterateHierarchyV2_Call) RunAndReturn

func (_c *ClusterCache_IterateHierarchyV2_Call) RunAndReturn(run func(keys []kube.ResourceKey, action func(resource *cache.Resource, namespaceResources map[kube.ResourceKey]*cache.Resource) bool)) *ClusterCache_IterateHierarchyV2_Call

type ClusterCache_OnEvent_Call

type ClusterCache_OnEvent_Call struct {
	*mock.Call
}

ClusterCache_OnEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnEvent'

func (*ClusterCache_OnEvent_Call) Return

func (*ClusterCache_OnEvent_Call) Run

func (*ClusterCache_OnEvent_Call) RunAndReturn

type ClusterCache_OnProcessEventsHandler_Call

type ClusterCache_OnProcessEventsHandler_Call struct {
	*mock.Call
}

ClusterCache_OnProcessEventsHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnProcessEventsHandler'

func (*ClusterCache_OnProcessEventsHandler_Call) Return

func (*ClusterCache_OnProcessEventsHandler_Call) Run

func (*ClusterCache_OnProcessEventsHandler_Call) RunAndReturn

type ClusterCache_OnResourceUpdated_Call

type ClusterCache_OnResourceUpdated_Call struct {
	*mock.Call
}

ClusterCache_OnResourceUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnResourceUpdated'

func (*ClusterCache_OnResourceUpdated_Call) Return

func (*ClusterCache_OnResourceUpdated_Call) Run

func (*ClusterCache_OnResourceUpdated_Call) RunAndReturn

Jump to

Keyboard shortcuts

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