testhelpers

package
v0.0.0-...-993a85b Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Code generated by counterfeiter. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PickAPort

func PickAPort() int

PickAPort returns a port that is likely free for use in a Ginkgo test

func TempDir

func TempDir() string

func TempFileName

func TempFileName() string

Types

type ClientTLSFilePaths

type ClientTLSFilePaths struct {
	ServerCA, ClientCert, ClientKey string
}

type Credentials

type Credentials struct {
	CA, Key, Cert []byte
}

type FakeCloudControllerCopilot_BulkSyncServer

type FakeCloudControllerCopilot_BulkSyncServer struct {
	SendAndCloseStub func(*api.BulkSyncResponse) error

	RecvStub func() (*api.BulkSyncRequestChunk, error)

	SetHeaderStub func(metadata.MD) error

	SendHeaderStub func(metadata.MD) error

	SetTrailerStub func(metadata.MD)

	ContextStub func() context.Context

	SendMsgStub func(m interface{}) error

	RecvMsgStub func(m interface{}) error
	// contains filtered or unexported fields
}

func (*FakeCloudControllerCopilot_BulkSyncServer) Context

func (*FakeCloudControllerCopilot_BulkSyncServer) ContextCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) ContextCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) ContextReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) ContextReturns(result1 context.Context)

func (*FakeCloudControllerCopilot_BulkSyncServer) ContextReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) ContextReturnsOnCall(i int, result1 context.Context)

func (*FakeCloudControllerCopilot_BulkSyncServer) Invocations

func (fake *FakeCloudControllerCopilot_BulkSyncServer) Invocations() map[string][][]interface{}

func (*FakeCloudControllerCopilot_BulkSyncServer) Recv

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvMsg

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvMsg(m interface{}) error

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvMsgArgsForCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvMsgArgsForCall(i int) interface{}

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvMsgCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvMsgCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvMsgReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvMsgReturns(result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvMsgReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvMsgReturnsOnCall(i int, result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvReturns(result1 *api.BulkSyncRequestChunk, result2 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) RecvReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) RecvReturnsOnCall(i int, result1 *api.BulkSyncRequestChunk, result2 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SendAndClose

func (*FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseArgsForCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseArgsForCall(i int) *api.BulkSyncResponse

func (*FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseReturns(result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendAndCloseReturnsOnCall(i int, result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SendHeader

func (*FakeCloudControllerCopilot_BulkSyncServer) SendHeaderArgsForCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendHeaderArgsForCall(i int) metadata.MD

func (*FakeCloudControllerCopilot_BulkSyncServer) SendHeaderCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendHeaderCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) SendHeaderReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendHeaderReturns(result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SendHeaderReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendHeaderReturnsOnCall(i int, result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SendMsg

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendMsg(m interface{}) error

func (*FakeCloudControllerCopilot_BulkSyncServer) SendMsgArgsForCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendMsgArgsForCall(i int) interface{}

func (*FakeCloudControllerCopilot_BulkSyncServer) SendMsgCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendMsgCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) SendMsgReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendMsgReturns(result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SendMsgReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SendMsgReturnsOnCall(i int, result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SetHeader

func (*FakeCloudControllerCopilot_BulkSyncServer) SetHeaderArgsForCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetHeaderArgsForCall(i int) metadata.MD

func (*FakeCloudControllerCopilot_BulkSyncServer) SetHeaderCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetHeaderCallCount() int

func (*FakeCloudControllerCopilot_BulkSyncServer) SetHeaderReturns

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetHeaderReturns(result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SetHeaderReturnsOnCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetHeaderReturnsOnCall(i int, result1 error)

func (*FakeCloudControllerCopilot_BulkSyncServer) SetTrailer

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetTrailer(arg1 metadata.MD)

func (*FakeCloudControllerCopilot_BulkSyncServer) SetTrailerArgsForCall

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetTrailerArgsForCall(i int) metadata.MD

func (*FakeCloudControllerCopilot_BulkSyncServer) SetTrailerCallCount

func (fake *FakeCloudControllerCopilot_BulkSyncServer) SetTrailerCallCount() int

type MTLSCredentials

type MTLSCredentials struct {
	Server      *Credentials
	Client      *Credentials
	OtherClient *Credentials
	TempDir     string
}

func GenerateMTLS

func GenerateMTLS() MTLSCredentials

func (MTLSCredentials) CleanupTempFiles

func (m MTLSCredentials) CleanupTempFiles()

func (MTLSCredentials) ClientTLSConfig

func (m MTLSCredentials) ClientTLSConfig() *tls.Config

func (MTLSCredentials) CreateClientTLSFiles

func (m MTLSCredentials) CreateClientTLSFiles() ClientTLSFilePaths

CreateClientTLSFiles creates files that can be passed into the configuration for the server frontend Call m.CleanupTempFiles to remove these files

func (MTLSCredentials) CreateServerTLSFiles

func (m MTLSCredentials) CreateServerTLSFiles() ServerTLSFilePaths

CreateServerTLSFiles creates files that can be passed into the configuration for the server frontend Call m.CleanupTempFiles to remove these files

func (MTLSCredentials) OtherClientTLSConfig

func (m MTLSCredentials) OtherClientTLSConfig() *tls.Config

func (MTLSCredentials) ServerTLSConfig

func (m MTLSCredentials) ServerTLSConfig() *tls.Config

func (MTLSCredentials) ServerTLSConfigForOtherClient

func (m MTLSCredentials) ServerTLSConfigForOtherClient() *tls.Config

type MockBBSServer

type MockBBSServer struct {
	Server *ghttp.Server
}

func NewMockBBSServer

func NewMockBBSServer() *MockBBSServer

func (*MockBBSServer) SetPostV1ActualLRPsList

func (m *MockBBSServer) SetPostV1ActualLRPsList(actualLRPs []*bbsmodels.ActualLRP)

func (*MockBBSServer) SetPostV1EventsResponse

func (m *MockBBSServer) SetPostV1EventsResponse(actualLRP *bbsmodels.ActualLRP)

type MockMCPUpdater

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

func (*MockMCPUpdater) Apply

func (m *MockMCPUpdater) Apply(c *sink.Change) error

func (*MockMCPUpdater) GetAllDestinationRules

func (m *MockMCPUpdater) GetAllDestinationRules() []*v1alpha3.DestinationRule

func (*MockMCPUpdater) GetAllGateways

func (m *MockMCPUpdater) GetAllGateways() []*v1alpha3.Gateway

func (*MockMCPUpdater) GetAllMessageNames

func (m *MockMCPUpdater) GetAllMessageNames() []string

func (*MockMCPUpdater) GetAllObjectNames

func (m *MockMCPUpdater) GetAllObjectNames() map[string][]string

func (*MockMCPUpdater) GetAllServiceEntries

func (m *MockMCPUpdater) GetAllServiceEntries() []*v1alpha3.ServiceEntry

func (*MockMCPUpdater) GetAllSidecars

func (m *MockMCPUpdater) GetAllSidecars() []*v1alpha3.Sidecar

func (*MockMCPUpdater) GetAllVirtualServices

func (m *MockMCPUpdater) GetAllVirtualServices() []*v1alpha3.VirtualService

type MockMetricReporter

type MockMetricReporter struct{}

MetricReporter is used to report metrics for an MCP client.

func (*MockMetricReporter) Close

func (m *MockMetricReporter) Close() error

func (*MockMetricReporter) RecordRecvError

func (m *MockMetricReporter) RecordRecvError(err error, code codes.Code)

func (*MockMetricReporter) RecordRequestAck

func (m *MockMetricReporter) RecordRequestAck(collection string, connectionID int64)

func (*MockMetricReporter) RecordRequestNack

func (m *MockMetricReporter) RecordRequestNack(collection string, connectionID int64, code codes.Code)

func (*MockMetricReporter) RecordRequestSize

func (m *MockMetricReporter) RecordRequestSize(collection string, connectionID int64, size int)

func (*MockMetricReporter) RecordSendError

func (m *MockMetricReporter) RecordSendError(err error, code codes.Code)

func (*MockMetricReporter) RecordStreamCreateSuccess

func (m *MockMetricReporter) RecordStreamCreateSuccess()

func (*MockMetricReporter) SetStreamCount

func (m *MockMetricReporter) SetStreamCount(clients int64)

type MockPilotMCPClient

type MockPilotMCPClient struct {
	*MockMCPUpdater
	// contains filtered or unexported fields
}

func NewMockPilotMCPClient

func NewMockPilotMCPClient(tlsConfig *tls.Config, serverAddr string) (*MockPilotMCPClient, error)

func (*MockPilotMCPClient) Close

func (m *MockPilotMCPClient) Close() error

type MockPolicyServer

type MockPolicyServer struct {
	Server *ghttp.Server
}

func NewMockPolicyServer

func NewMockPolicyServer() *MockPolicyServer

func (*MockPolicyServer) SetGetPoliciesResponse

func (m *MockPolicyServer) SetGetPoliciesResponse(c2cPolicies []*policy_client.Policy)

type ServerTLSFilePaths

type ServerTLSFilePaths struct {
	ClientCA, OtherClientCA, ServerCert, ServerKey string
}

Jump to

Keyboard shortcuts

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