testing

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAppChannel

type MockAppChannel struct {
	mock.Mock
}

MockAppChannel is an autogenerated mock type for the AppChannel type

func NewMockAppChannel added in v1.9.0

func NewMockAppChannel(t mockConstructorTestingTNewMockAppChannel) *MockAppChannel

NewMockAppChannel creates a new instance of MockAppChannel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockAppChannel) GetAppConfig added in v1.2.0

func (_m *MockAppChannel) GetAppConfig() (*config.ApplicationConfig, error)

GetAppConfig provides a mock function with given fields:

func (*MockAppChannel) GetBaseAddress added in v0.6.0

func (_m *MockAppChannel) GetBaseAddress() string

GetBaseAddress provides a mock function with given fields:

func (*MockAppChannel) HealthProbe added in v1.9.0

func (_m *MockAppChannel) HealthProbe(ctx context.Context) (bool, error)

HealthProbe provides a mock function with given fields: ctx

func (*MockAppChannel) InvokeMethod

InvokeMethod provides a mock function with given fields: ctx, req

func (*MockAppChannel) SetAppHealth added in v1.9.0

func (_m *MockAppChannel) SetAppHealth(ah *apphealth.AppHealth)

SetAppHealth provides a mock function with given fields: ah

type MockClientConn added in v1.3.0

type MockClientConn struct {
	grpc.ClientConnInterface
	InvokeFn func(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error
}

MockClientConn is a mock implementation of grpc.ClientConnInterface.

func (*MockClientConn) Close added in v1.3.0

func (m *MockClientConn) Close() error

Close implements io.Closer.

func (*MockClientConn) Invoke added in v1.3.0

func (m *MockClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error

type MockServer added in v1.0.0

type MockServer struct {
	Error                    error
	Subscriptions            []*runtimev1pb.TopicSubscription
	Bindings                 []string
	BindingEventResponse     runtimev1pb.BindingEventResponse
	TopicEventResponseStatus runtimev1pb.TopicEventResponse_TopicEventResponseStatus
}

MockServer implementation of fake user app server. It implements both AppCallback and AppCallbackHealthCheck.

func (*MockServer) HealthCheck added in v1.9.0

func (*MockServer) ListInputBindings added in v1.0.0

func (*MockServer) ListTopicSubscriptions added in v1.0.0

func (m *MockServer) ListTopicSubscriptions(ctx context.Context, in *emptypb.Empty) (*runtimev1pb.ListTopicSubscriptionsResponse, error)

func (*MockServer) OnBindingEvent added in v1.0.0

func (*MockServer) OnInvoke added in v1.0.0

func (*MockServer) OnTopicEvent added in v1.0.0

Jump to

Keyboard shortcuts

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