testing

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockupErr = errors.New("mockup error")

Functions

This section is empty.

Types

type AppClientMock

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

func NewAppClientMock

func NewAppClientMock(n int) *AppClientMock

func (*AppClientMock) AppByGUIDCallCount added in v1.3.0

func (m *AppClientMock) AppByGUIDCallCount() int

func (*AppClientMock) AppByGuid

func (m *AppClientMock) AppByGuid(guid string) (cfclient.App, error)

func (*AppClientMock) CreateApp

func (m *AppClientMock) CreateApp(appID, spaceID string)

func (*AppClientMock) DeleteApp added in v1.3.0

func (m *AppClientMock) DeleteApp(appID string)

func (*AppClientMock) GetOrgByGUIDCallCount added in v1.3.0

func (m *AppClientMock) GetOrgByGUIDCallCount() int

func (*AppClientMock) GetOrgByGuid added in v1.3.0

func (m *AppClientMock) GetOrgByGuid(orgGUID string) (cfclient.Org, error)

func (*AppClientMock) GetSpaceByGUIDCallCount added in v1.3.0

func (m *AppClientMock) GetSpaceByGUIDCallCount() int

func (*AppClientMock) GetSpaceByGuid added in v1.3.0

func (m *AppClientMock) GetSpaceByGuid(spaceGUID string) (cfclient.Space, error)

func (*AppClientMock) ListApps

func (m *AppClientMock) ListApps() ([]cfclient.App, error)

func (*AppClientMock) ListAppsByQueryWithLimits

func (m *AppClientMock) ListAppsByQueryWithLimits(query url.Values, totalPages int) ([]cfclient.App, error)

func (*AppClientMock) ListAppsCallCount added in v1.3.0

func (m *AppClientMock) ListAppsCallCount() int

func (*AppClientMock) ResetCallCounts added in v1.3.0

func (m *AppClientMock) ResetCallCounts()

type CloudControllerMock

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

func NewCloudControllerMock

func NewCloudControllerMock(port int) *CloudControllerMock

func (*CloudControllerMock) Start

func (c *CloudControllerMock) Start() error

func (*CloudControllerMock) Stop

func (c *CloudControllerMock) Stop() error

type EventRouterMock

type EventRouterMock struct {
	MockRouteError bool
	// contains filtered or unexported fields
}

func NewEventRouterMock

func NewEventRouterMock(mockRouteError bool) *EventRouterMock

func (*EventRouterMock) Events

func (router *EventRouterMock) Events() []*events.Envelope

func (*EventRouterMock) Route

func (router *EventRouterMock) Route(msg *events.Envelope) error

type EventWriterMetricMock added in v1.3.0

type EventWriterMetricMock struct {
	Block          bool
	CapturedEvents []map[string]interface{}
	PostBatchFn    func(events []map[string]interface{}) error
	ReturnErr      bool
	// contains filtered or unexported fields
}

func (*EventWriterMetricMock) Read added in v1.3.0

func (m *EventWriterMetricMock) Read() []map[string]interface{}

func (*EventWriterMetricMock) Write added in v1.3.0

func (m *EventWriterMetricMock) Write(events []map[string]interface{}) (error, uint64)

type EventWriterMock

type EventWriterMock struct {
	Block bool

	PostBatchFn func(events []map[string]interface{}) error
	ReturnErr   bool
	// contains filtered or unexported fields
}

func (*EventWriterMock) CapturedEvents

func (m *EventWriterMock) CapturedEvents() []map[string]interface{}

func (*EventWriterMock) Write

func (m *EventWriterMock) Write(events []map[string]interface{}) (error, uint64)

type MemoryCacheMock

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

func NewMemoryCacheMock

func NewMemoryCacheMock() *MemoryCacheMock

func (*MemoryCacheMock) Close

func (c *MemoryCacheMock) Close() error

func (*MemoryCacheMock) GetAllApps

func (c *MemoryCacheMock) GetAllApps() (map[string]*cache.App, error)

func (*MemoryCacheMock) GetApp

func (c *MemoryCacheMock) GetApp(appGuid string) (*cache.App, error)

func (*MemoryCacheMock) Open

func (c *MemoryCacheMock) Open() error

func (*MemoryCacheMock) SetIgnoreApp

func (c *MemoryCacheMock) SetIgnoreApp(ignore bool)

type MemoryEventSourceMock

type MemoryEventSourceMock struct {
	MockOpenErr bool
	// contains filtered or unexported fields
}

func NewMemoryEventSourceMock

func NewMemoryEventSourceMock(eps int, totalEvents int64, errCode int) *MemoryEventSourceMock

func (*MemoryEventSourceMock) Close

func (e *MemoryEventSourceMock) Close() error

func (*MemoryEventSourceMock) Open

func (e *MemoryEventSourceMock) Open() error

func (*MemoryEventSourceMock) Read

func (e *MemoryEventSourceMock) Read() (<-chan *events.Envelope, <-chan error)

type MemorySinkMock

type MemorySinkMock struct {
	Events    []*events.Envelope
	ReturnErr bool
}

func NewMemorySinkMock

func NewMemorySinkMock() *MemorySinkMock

func (*MemorySinkMock) Close

func (l *MemorySinkMock) Close() error

func (*MemorySinkMock) Open

func (l *MemorySinkMock) Open() error

func (*MemorySinkMock) Write

func (l *MemorySinkMock) Write(fields *events.Envelope) error

type TokenClientMock

type TokenClientMock struct {
	GetTokenFn func() (string, error)
}

func (*TokenClientMock) GetToken

func (m *TokenClientMock) GetToken() (string, error)

Jump to

Keyboard shortcuts

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