test

package
v0.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HomeNamespace    = "homeNamespace"
	ForeignNamespace = "foreignNamespace"

	Pod1 = "homePod1"
	Pod2 = "homePod2"
)

Variables

View Source
var (
	Pods = map[string]*corev1.Pod{
		utils.Keyer(HomeNamespace, Pod1): {
			ObjectMeta: metav1.ObjectMeta{
				Name:      Pod1,
				Namespace: HomeNamespace,
			},
		},
		utils.Keyer(HomeNamespace, Pod2): {
			ObjectMeta: metav1.ObjectMeta{
				Name:      Pod2,
				Namespace: HomeNamespace,
			},
		},

		utils.Keyer(ForeignNamespace, Pod1): {
			ObjectMeta: metav1.ObjectMeta{
				Name:      Pod1,
				Namespace: ForeignNamespace,
			},
		},
		utils.Keyer(ForeignNamespace, Pod2): {
			ObjectMeta: metav1.ObjectMeta{
				Name:      Pod2,
				Namespace: ForeignNamespace,
			},
		},
	}
)

Functions

This section is empty.

Types

type MockManager

type MockManager struct {
	HomeCache    map[string]map[apimgmt.ApiType]map[string]v1.Object
	ForeignCache map[string]map[apimgmt.ApiType]map[string]v1.Object
}

func (*MockManager) AddForeignEntry

func (m *MockManager) AddForeignEntry(namespace string, api apimgmt.ApiType, obj v1.Object)

func (*MockManager) AddForeignEventHandlers

func (m *MockManager) AddForeignEventHandlers(apiType apimgmt.ApiType, s string, funcs *cache.ResourceEventHandlerFuncs) error

func (*MockManager) AddForeignNamespace

func (m *MockManager) AddForeignNamespace(s string) error

func (*MockManager) AddHomeEntry

func (m *MockManager) AddHomeEntry(namespace string, api apimgmt.ApiType, obj v1.Object)

func (*MockManager) AddHomeEventHandlers

func (m *MockManager) AddHomeEventHandlers(apiType apimgmt.ApiType, s string, funcs *cache.ResourceEventHandlerFuncs) error

func (*MockManager) AddHomeNamespace

func (m *MockManager) AddHomeNamespace(s string) error

func (*MockManager) CheckNamespaceCaching

func (m *MockManager) CheckNamespaceCaching(_ *wait.Backoff, _ string, _ string, _ apimgmt.ApiType) error

func (*MockManager) Clear added in v0.3.0

func (m *MockManager) Clear()

Clear is a function used in tests only to clear the mock's state.

func (*MockManager) GetForeignAPIByIndex added in v0.3.0

func (m *MockManager) GetForeignAPIByIndex(apiType apimgmt.ApiType, s, s2 string) (interface{}, error)

GetForeignAPIByIndex is a mock implementation of the corresponding function (unimplemented).

func (*MockManager) GetForeignNamespacedObject

func (m *MockManager) GetForeignNamespacedObject(apiType apimgmt.ApiType, s string, s2 string) (interface{}, error)

func (*MockManager) GetHomeAPIByIndex added in v0.3.0

func (m *MockManager) GetHomeAPIByIndex(apiType apimgmt.ApiType, s, s2 string) (interface{}, error)

GetHomeAPIByIndex is a mock implementation of the corresponding function (unimplemented).

func (*MockManager) GetHomeNamespacedObject

func (m *MockManager) GetHomeNamespacedObject(apiType apimgmt.ApiType, s string, s2 string) (interface{}, error)

func (*MockManager) ListForeignNamespacedObject

func (m *MockManager) ListForeignNamespacedObject(apiType apimgmt.ApiType, s string) ([]interface{}, error)

func (*MockManager) ListHomeNamespacedObject

func (m *MockManager) ListHomeNamespacedObject(apiType apimgmt.ApiType, s string) ([]interface{}, error)

func (*MockManager) RemoveNamespace

func (m *MockManager) RemoveNamespace(s string)

func (*MockManager) ResyncListForeignNamespacedObject

func (m *MockManager) ResyncListForeignNamespacedObject(apiType apimgmt.ApiType, s string) ([]interface{}, error)

func (*MockManager) ResyncListHomeNamespacedObject

func (m *MockManager) ResyncListHomeNamespacedObject(apiType apimgmt.ApiType, s string) ([]interface{}, error)

func (*MockManager) StartForeignNamespace

func (m *MockManager) StartForeignNamespace(s string, c chan struct{}) error

func (*MockManager) StartHomeNamespace

func (m *MockManager) StartHomeNamespace(s string, c chan struct{}) error

Jump to

Keyboard shortcuts

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