testing

package
v0.0.0-...-949823d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Overview

Package testing is a generated GoMock package.

Index

Constants

View Source
const ErrorInstanceID = "errorInstanceID"
View Source
const (
	TestRuntimeConfigID = "consumer0"
)

Variables

View Source
var (
	ErrFakeWorkflowComponentError             = errors.New("fake workflow error")
	ErrFakeWorkflowNonRecursiveTerminateError = errors.New("fake workflow non recursive terminate error")
	ErrFakeWorkflowNonRecurisvePurgeError     = errors.New("fake workflow non recursive purge error")
)
View Source
var TestResiliency = &v1alpha1.Resiliency{
	Spec: v1alpha1.ResiliencySpec{
		Policies: v1alpha1.Policies{
			Retries: map[string]v1alpha1.Retry{
				"singleRetry": {
					MaxRetries:  ptr.Of(1),
					MaxInterval: "100ms",
					Policy:      "constant",
					Duration:    "10ms",
				},
			},
			Timeouts: map[string]string{
				"fast": "100ms",
			},
		},
		Targets: v1alpha1.Targets{
			Components: map[string]v1alpha1.ComponentPolicyNames{
				"failOutput": {
					Outbound: v1alpha1.PolicyNames{
						Retry:   "singleRetry",
						Timeout: "fast",
					},
				},
				"failPubsub": {
					Outbound: v1alpha1.PolicyNames{
						Retry:   "singleRetry",
						Timeout: "fast",
					},
					Inbound: v1alpha1.PolicyNames{
						Retry:   "singleRetry",
						Timeout: "fast",
					},
				},
				"failingInputBinding": {
					Inbound: v1alpha1.PolicyNames{
						Retry:   "singleRetry",
						Timeout: "fast",
					},
				},
			},
		},
	},
}

Functions

func GetFakeMetadataItems

func GetFakeMetadataItems() []commonapi.NameValuePair

func GetFakeProperties

func GetFakeProperties() map[string]string

func GetFreePorts

func GetFreePorts(num uint) ([]int, error)

GetFreePorts asks the kernel for `num` free open ports that are ready to use. This code is retrofitted from freeport.GetFreePort().

func MatchContextInterface

func MatchContextInterface(v any) bool

func WaitForListeningAddress

func WaitForListeningAddress(t *testing.T, timeout time.Duration, addresses ...string)

WaitForListeningAddress waits for `addresses` to be listening for up to `timeout`.

Types

type Event

type Event struct {
	EventName   string        `json:"eventName,omitempty"`
	To          []string      `json:"to,omitempty"`
	Concurrency string        `json:"concurrency,omitempty"`
	CreatedAt   time.Time     `json:"createdAt,omitempty"`
	State       []KeyValState `json:"state,omitempty"`
	Data        interface{}   `json:"data,omitempty"`
}

Event is an app response event.

type FailingAppChannel

type FailingAppChannel struct {
	Failure Failure
	KeyFunc func(req *invokev1.InvokeMethodRequest) string
}

func (*FailingAppChannel) GetAppConfig

func (f *FailingAppChannel) GetAppConfig(_ context.Context, appID string) (*config.ApplicationConfig, error)

func (*FailingAppChannel) HealthProbe

func (f *FailingAppChannel) HealthProbe(ctx context.Context) (bool, error)

func (*FailingAppChannel) InvokeMethod

func (*FailingAppChannel) SetAppHealth

func (f *FailingAppChannel) SetAppHealth(ah *apphealth.AppHealth)

func (*FailingAppChannel) TriggerJob

func (f *FailingAppChannel) TriggerJob(ctx context.Context, name string, data *anypb.Any) (*invokev1.InvokeMethodResponse, error)

type FailingBinding

type FailingBinding struct {
	Failure Failure
}

func (*FailingBinding) Close

func (m *FailingBinding) Close() error

func (*FailingBinding) Init

func (m *FailingBinding) Init(ctx context.Context, metadata bindings.Metadata) error

Init is a mock initialization method.

func (*FailingBinding) Invoke

Invoke is a mock invoke method.

func (*FailingBinding) Operations

func (m *FailingBinding) Operations() []bindings.OperationKind

Operations is a mock operations method.

type FailingConfigurationStore

type FailingConfigurationStore struct {
	Failure Failure
}

func (*FailingConfigurationStore) Close

func (f *FailingConfigurationStore) Close() error

func (*FailingConfigurationStore) Get

func (*FailingConfigurationStore) Init

func (*FailingConfigurationStore) Subscribe

func (*FailingConfigurationStore) Unsubscribe

type FailingDirectMessaging

type FailingDirectMessaging struct {
	Failure           Failure
	SuccessStatusCode int
}

func (*FailingDirectMessaging) Invoke

func (*FailingDirectMessaging) SetAppChannel

func (_m *FailingDirectMessaging) SetAppChannel(appChannel channel.AppChannel)

func (*FailingDirectMessaging) SetHTTPEndpointsAppChannels

func (_m *FailingDirectMessaging) SetHTTPEndpointsAppChannels(nonResourceChannel channel.HTTPEndpointAppChannel, resourceChannels map[string]channel.HTTPEndpointAppChannel)

SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel

type FailingPubsub

type FailingPubsub struct {
	Failure Failure
}

FailingPubsub is a mock pubsub component object that simulates failures.

func (*FailingPubsub) BulkPublish

func (*FailingPubsub) BulkSubscribe

func (*FailingPubsub) Close

func (f *FailingPubsub) Close() error

func (*FailingPubsub) Features

func (f *FailingPubsub) Features() []pubsub.Feature

func (*FailingPubsub) Init

func (f *FailingPubsub) Init(ctx context.Context, metadata pubsub.Metadata) error

func (*FailingPubsub) Publish

func (f *FailingPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error

func (*FailingPubsub) Subscribe

func (f *FailingPubsub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error

type FailingSecretStore

type FailingSecretStore struct {
	Failure Failure
}

func (FailingSecretStore) Close

func (c FailingSecretStore) Close() error

func (FailingSecretStore) Features

func (c FailingSecretStore) Features() []secretstores.Feature

func (FailingSecretStore) Init

type FailingStatestore

type FailingStatestore struct {
	Failure     Failure
	BulkFailKey atomic.Pointer[string]
}

func (*FailingStatestore) BulkDelete

func (f *FailingStatestore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error

func (*FailingStatestore) BulkGet

func (*FailingStatestore) BulkSet

func (*FailingStatestore) Close

func (f *FailingStatestore) Close() error

func (*FailingStatestore) Delete

func (*FailingStatestore) Features

func (f *FailingStatestore) Features() []state.Feature

func (*FailingStatestore) Get

func (*FailingStatestore) Init

func (f *FailingStatestore) Init(ctx context.Context, metadata state.Metadata) error

func (*FailingStatestore) Multi

func (*FailingStatestore) Ping

func (f *FailingStatestore) Ping() error

func (*FailingStatestore) Query

func (*FailingStatestore) Set

type FailingSubtleCrypto

type FailingSubtleCrypto struct {
	FakeSubtleCrypto
	Failure Failure
}

func (FailingSubtleCrypto) Decrypt

func (c FailingSubtleCrypto) Decrypt(ctx context.Context, ciphertext []byte, algorithm string, keyName string, nonce []byte, tag []byte, associatedData []byte) (plaintext []byte, err error)

func (FailingSubtleCrypto) Encrypt

func (c FailingSubtleCrypto) Encrypt(ctx context.Context, plaintext []byte, algorithm string, keyName string, nonce []byte, associatedData []byte) (ciphertext []byte, tag []byte, err error)

func (FailingSubtleCrypto) GetKey

func (c FailingSubtleCrypto) GetKey(ctx context.Context, keyName string) (pubKey jwk.Key, err error)

func (FailingSubtleCrypto) Sign

func (c FailingSubtleCrypto) Sign(ctx context.Context, digest []byte, algorithm string, keyName string) (signature []byte, err error)

func (FailingSubtleCrypto) UnwrapKey

func (c FailingSubtleCrypto) UnwrapKey(ctx context.Context, wrappedKey []byte, algorithm string, keyName string, nonce []byte, tag []byte, associatedData []byte) (plaintextKey jwk.Key, err error)

func (FailingSubtleCrypto) Verify

func (c FailingSubtleCrypto) Verify(ctx context.Context, digest []byte, signature []byte, algorithm string, keyName string) (valid bool, err error)

func (FailingSubtleCrypto) WrapKey

func (c FailingSubtleCrypto) WrapKey(ctx context.Context, plaintextKey jwk.Key, algorithm string, keyName string, nonce []byte, associatedData []byte) (wrappedKey []byte, tag []byte, err error)

type Failure

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

func NewFailure

func NewFailure(fails map[string]int, timeouts map[string]time.Duration, callCount map[string]int) Failure

func (*Failure) CallCount

func (f *Failure) CallCount(key string) int

func (*Failure) PerformFailure

func (f *Failure) PerformFailure(key string) error

type FakeSecretStore

type FakeSecretStore struct{}

func (FakeSecretStore) Close

func (c FakeSecretStore) Close() error

func (FakeSecretStore) Features

func (c FakeSecretStore) Features() []secretstores.Feature

func (FakeSecretStore) Init

func (c FakeSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error

type FakeStateStore

type FakeStateStore struct {
	MaxOperations int
	NoLock        bool
	// contains filtered or unexported fields
}

func NewFakeStateStore

func NewFakeStateStore() *FakeStateStore

func (*FakeStateStore) BulkDelete

func (f *FakeStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error

func (*FakeStateStore) BulkGet

func (*FakeStateStore) BulkSet

func (f *FakeStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error

func (*FakeStateStore) CallCount

func (f *FakeStateStore) CallCount(op string) uint64

func (*FakeStateStore) Close

func (f *FakeStateStore) Close() error

func (*FakeStateStore) Delete

func (f *FakeStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error

func (*FakeStateStore) Features

func (f *FakeStateStore) Features() []state.Feature

func (*FakeStateStore) Get

func (*FakeStateStore) GetItems

func (f *FakeStateStore) GetItems() map[string]*FakeStateStoreItem

func (*FakeStateStore) Init

func (f *FakeStateStore) Init(ctx context.Context, metadata state.Metadata) error

func (*FakeStateStore) Multi

func (*FakeStateStore) MultiMaxSize

func (f *FakeStateStore) MultiMaxSize() int

func (*FakeStateStore) NewItem

func (f *FakeStateStore) NewItem(data []byte) *FakeStateStoreItem

func (*FakeStateStore) Ping

func (f *FakeStateStore) Ping() error

func (*FakeStateStore) Set

func (f *FakeStateStore) Set(ctx context.Context, req *state.SetRequest) error

type FakeStateStoreItem

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

type FakeSubtleCrypto

type FakeSubtleCrypto struct{}

func (FakeSubtleCrypto) Close

func (c FakeSubtleCrypto) Close() error

func (FakeSubtleCrypto) Decrypt

func (c FakeSubtleCrypto) Decrypt(ctx context.Context, ciphertext []byte, algorithm string, keyName string, nonce []byte, tag []byte, associatedData []byte) (plaintext []byte, err error)

func (FakeSubtleCrypto) Encrypt

func (c FakeSubtleCrypto) Encrypt(ctx context.Context, plaintext []byte, algorithm string, keyName string, nonce []byte, associatedData []byte) (ciphertext []byte, tag []byte, err error)

func (FakeSubtleCrypto) Features

func (c FakeSubtleCrypto) Features() []contribCrypto.Feature

func (FakeSubtleCrypto) GetKey

func (c FakeSubtleCrypto) GetKey(ctx context.Context, keyName string) (pubKey jwk.Key, err error)

func (FakeSubtleCrypto) Init

func (FakeSubtleCrypto) Sign

func (c FakeSubtleCrypto) Sign(ctx context.Context, digest []byte, algorithm string, keyName string) (signature []byte, err error)

func (FakeSubtleCrypto) SupportedEncryptionAlgorithms

func (c FakeSubtleCrypto) SupportedEncryptionAlgorithms() []string

func (FakeSubtleCrypto) SupportedSignatureAlgorithms

func (c FakeSubtleCrypto) SupportedSignatureAlgorithms() []string

func (FakeSubtleCrypto) UnwrapKey

func (c FakeSubtleCrypto) UnwrapKey(ctx context.Context, wrappedKey []byte, algorithm string, keyName string, nonce []byte, tag []byte, associatedData []byte) (plaintextKey jwk.Key, err error)

func (FakeSubtleCrypto) Verify

func (c FakeSubtleCrypto) Verify(ctx context.Context, digest []byte, signature []byte, algorithm string, keyName string) (valid bool, err error)

func (FakeSubtleCrypto) WrapKey

func (c FakeSubtleCrypto) WrapKey(ctx context.Context, plaintextKey jwk.Key, algorithm string, keyName string, nonce []byte, associatedData []byte) (wrappedKey []byte, tag []byte, err error)

type InMemoryPubsub

type InMemoryPubsub struct {
	mock.Mock
	// contains filtered or unexported fields
}

InMemoryPubsub is a mock pub-sub component object that works with in-memory handlers

func (*InMemoryPubsub) BulkPublish

func (*InMemoryPubsub) BulkSubscribe

func (*InMemoryPubsub) Close

func (m *InMemoryPubsub) Close() error

Close is a mock close method.

func (*InMemoryPubsub) Features

func (m *InMemoryPubsub) Features() []pubsub.Feature

func (*InMemoryPubsub) Init

func (m *InMemoryPubsub) Init(ctx context.Context, metadata pubsub.Metadata) error

Init is a mock initialization method.

func (*InMemoryPubsub) Publish

func (m *InMemoryPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error

Publish is a mock publish method.

func (*InMemoryPubsub) SetBulkHandler

func (m *InMemoryPubsub) SetBulkHandler(h func(topic string, msg *pubsub.BulkMessage))

func (*InMemoryPubsub) SetHandler

func (m *InMemoryPubsub) SetHandler(h func(topic string, msg *pubsub.NewMessage))

func (*InMemoryPubsub) SetOnSubscribedTopicsChanged

func (m *InMemoryPubsub) SetOnSubscribedTopicsChanged(f func([]string))

func (*InMemoryPubsub) Subscribe

func (m *InMemoryPubsub) Subscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error

Subscribe is a mock subscribe method.

type KeyValState

type KeyValState struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

KeyValState is a key value struct for state.

type MockApp

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

MockApp is a mock for an app.

func NewMockApp

func NewMockApp(returnBody bool, messageCount int, noprint bool) *MockApp

NewMockApp returns a new mocked app.

func (*MockApp) Run

func (a *MockApp) Run(port int)

Run opens a test HTTP server and echo endpoint on the mock object.

type MockBinding

type MockBinding struct {
	mock.Mock
	// contains filtered or unexported fields
}

MockBinding is a mock input/output component object.

func (*MockBinding) Close

func (m *MockBinding) Close() error

func (*MockBinding) Init

func (m *MockBinding) Init(ctx context.Context, metadata bindings.Metadata) error

Init is a mock initialization method.

func (*MockBinding) Invoke

Invoke is a mock invoke method.

func (*MockBinding) Operations

func (m *MockBinding) Operations() []bindings.OperationKind

Operations is a mock operations method.

func (*MockBinding) Read

func (m *MockBinding) Read(ctx context.Context, handler bindings.Handler) error

Read is a mock read method.

func (*MockBinding) SetOnReadCloseCh

func (m *MockBinding) SetOnReadCloseCh(ch chan struct{})

type MockConfigurationStore

type MockConfigurationStore struct {
	mock.Mock
}

MockConfigurationStore is an autogenerated mock type for the Store type

func (*MockConfigurationStore) Close

func (_m *MockConfigurationStore) Close() error

func (*MockConfigurationStore) Get

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

func (*MockConfigurationStore) Init

Init provides a mock function with given fields: metadata

func (*MockConfigurationStore) Subscribe

Subscribe provides a mock function with given fields: ctx, req, handler

func (*MockConfigurationStore) Unsubscribe

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

type MockDirectMessaging

type MockDirectMessaging struct {
	mock.Mock
}

MockDirectMessaging is a semi-autogenerated mock type for the MockDirectMessaging type. Note: This file is created by copy/pasting values and renaming to use MockDirectMessaging instead of DirectMessaging. You run "mockery --name directMessaging" in "pkg/messaging" and modify the corresponding values here.

func (*MockDirectMessaging) Close

func (_m *MockDirectMessaging) Close() error

func (*MockDirectMessaging) Invoke

Invoke provides a mock function with given fields: ctx, targetAppID, req

func (*MockDirectMessaging) SetAppChannel

func (_m *MockDirectMessaging) SetAppChannel(appChannel channel.AppChannel)

func (*MockDirectMessaging) SetHTTPEndpointsAppChannels

func (_m *MockDirectMessaging) SetHTTPEndpointsAppChannels(nonResourceChannel channel.HTTPEndpointAppChannel, resourceChannels map[string]channel.HTTPEndpointAppChannel)

SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel

type MockFieldIndexer

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

func (*MockFieldIndexer) IndexField

func (t *MockFieldIndexer) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error

type MockManager

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

func NewMockManager

func NewMockManager() *MockManager

func (*MockManager) Add

func (m *MockManager) Add(runnable manager.Runnable) error

func (*MockManager) AddHealthzCheck

func (m *MockManager) AddHealthzCheck(name string, check healthz.Checker) error

func (*MockManager) AddMetricsExtraHandler

func (m *MockManager) AddMetricsExtraHandler(path string, handler http.Handler) error

func (*MockManager) AddMetricsServerExtraHandler

func (m *MockManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error

func (*MockManager) AddReadyzCheck

func (m *MockManager) AddReadyzCheck(name string, check healthz.Checker) error

func (*MockManager) Elected

func (m *MockManager) Elected() <-chan struct{}

func (*MockManager) GetAPIReader

func (m *MockManager) GetAPIReader() client.Reader

func (*MockManager) GetCache

func (m *MockManager) GetCache() cache.Cache

func (*MockManager) GetClient

func (m *MockManager) GetClient() client.Client

func (*MockManager) GetConfig

func (m *MockManager) GetConfig() *rest.Config

func (*MockManager) GetControllerOptions

func (m *MockManager) GetControllerOptions() config.Controller

func (*MockManager) GetEventRecorderFor

func (m *MockManager) GetEventRecorderFor(name string) record.EventRecorder

func (*MockManager) GetFieldIndexer

func (m *MockManager) GetFieldIndexer() client.FieldIndexer

func (*MockManager) GetHTTPClient

func (m *MockManager) GetHTTPClient() *http.Client

func (*MockManager) GetIndexerFunc

func (m *MockManager) GetIndexerFunc(obj client.Object) client.IndexerFunc

func (*MockManager) GetLogger

func (m *MockManager) GetLogger() logr.Logger

func (*MockManager) GetRESTMapper

func (m *MockManager) GetRESTMapper() meta.RESTMapper

func (*MockManager) GetRunnables

func (m *MockManager) GetRunnables() []manager.Runnable

func (*MockManager) GetScheme

func (m *MockManager) GetScheme() *runtime.Scheme

func (*MockManager) GetWebhookServer

func (m *MockManager) GetWebhookServer() webhook.Server

func (*MockManager) SetFields

func (m *MockManager) SetFields(interface{}) error

func (*MockManager) Start

func (m *MockManager) Start(ctx context.Context) error

type MockPubSub

type MockPubSub struct {
	mock.Mock
}

MockPubSub is a mock pub-sub component object.

func (*MockPubSub) BulkPublish

BulkPublish is a mock bulk publish method.

func (*MockPubSub) BulkSubscribe

BulkSubscribe is a mock bulk subscribe method.

func (*MockPubSub) Close

func (m *MockPubSub) Close() error

Close is a mock close method.

func (*MockPubSub) Features

func (m *MockPubSub) Features() []pubsub.Feature

func (*MockPubSub) Init

func (m *MockPubSub) Init(ctx context.Context, metadata pubsub.Metadata) error

Init is a mock initialization method.

func (*MockPubSub) Publish

func (m *MockPubSub) Publish(ctx context.Context, req *pubsub.PublishRequest) error

Publish is a mock publish method.

func (*MockPubSub) Subscribe

func (m *MockPubSub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error

Subscribe is a mock subscribe method.

type MockPubSubAdapter

type MockPubSubAdapter struct {
	PublishFn     func(ctx context.Context, req *pubsub.PublishRequest) error
	BulkPublishFn func(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
}

MockPubSubAdapter is mock for PubSubAdapter

func (*MockPubSubAdapter) BulkPublish

Publish is an adapter method for the runtime to pre-validate publish requests And then forward them to the Pub/Sub component. This method is used by the HTTP and gRPC APIs.

func (*MockPubSubAdapter) Publish

Publish is an adapter method for the runtime to pre-validate publish requests And then forward them to the Pub/Sub component. This method is used by the HTTP and gRPC APIs.

type MockQuerier

type MockQuerier struct {
	mock.Mock
}

MockQuerier is an autogenerated mock type for the Querier type

func (*MockQuerier) Query

Query provides a mock function with given fields: req

type MockResolver

type MockResolver struct {
	mock.Mock
}

MockResolver is a mock nameresolution component object.

func (*MockResolver) Close

func (m *MockResolver) Close() error

func (*MockResolver) Init

func (m *MockResolver) Init(_ context.Context, metadata nr.Metadata) error

Init is a mock initialization method.

func (*MockResolver) ResolveID

func (m *MockResolver) ResolveID(_ context.Context, req nr.ResolveRequest) (string, error)

ResolveID is a mock resolve method.

type MockStateStore

type MockStateStore struct {
	mock.Mock
}

MockStateStore is an autogenerated mock type for the Store type

func (*MockStateStore) BulkDelete

func (_m *MockStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error

func (*MockStateStore) BulkGet

func (*MockStateStore) BulkSet

func (_m *MockStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error

func (*MockStateStore) Close

func (_m *MockStateStore) Close() error

func (*MockStateStore) Delete

func (_m *MockStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error

Delete provides a mock function with given fields: req

func (*MockStateStore) Features

func (_m *MockStateStore) Features() []state.Feature

Features returns the features for this state store.

func (*MockStateStore) Get

Get provides a mock function with given fields: req

func (*MockStateStore) Init

func (_m *MockStateStore) Init(ctx context.Context, metadata state.Metadata) error

Init provides a mock function with given fields: metadata

func (*MockStateStore) Ping

func (_m *MockStateStore) Ping() error

Ping provides a mock function

func (*MockStateStore) Set

func (_m *MockStateStore) Set(ctx context.Context, req *state.SetRequest) error

Set provides a mock function with given fields: req

type MockStore

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

MockStore is a mock of Store interface.

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance.

func (*MockStore) Close

func (m *MockStore) Close() error

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStore) InitLockStore

func (m *MockStore) InitLockStore(ctx context.Context, metadata lock.Metadata) error

InitLockStore mocks base method.

func (*MockStore) TryLock

TryLock mocks base method.

func (*MockStore) Unlock

Unlock mocks base method.

type MockStoreMockRecorder

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

MockStoreMockRecorder is the mock recorder for MockStore.

func (*MockStoreMockRecorder) InitLockStore

func (mr *MockStoreMockRecorder) InitLockStore(ctx context.Context, metadata interface{}) *gomock.Call

InitLockStore indicates an expected call of InitLockStore.

func (*MockStoreMockRecorder) TryLock

func (mr *MockStoreMockRecorder) TryLock(ctx context.Context, req interface{}) *gomock.Call

TryLock indicates an expected call of TryLock.

func (*MockStoreMockRecorder) Unlock

func (mr *MockStoreMockRecorder) Unlock(ctx context.Context, req interface{}) *gomock.Call

Unlock indicates an expected call of Unlock.

type MockWorkflow

type MockWorkflow struct{}

func (*MockWorkflow) Close

func (w *MockWorkflow) Close() error

func (*MockWorkflow) Get

func (*MockWorkflow) Init

func (w *MockWorkflow) Init(metadata workflowContrib.Metadata) error

func (*MockWorkflow) Pause

func (*MockWorkflow) Purge

func (*MockWorkflow) RaiseEvent

func (*MockWorkflow) Resume

func (*MockWorkflow) Start

func (*MockWorkflow) Terminate

type TransactionalStoreMock

type TransactionalStoreMock struct {
	MaxOperations int
	MockStateStore
}

func (*TransactionalStoreMock) Close

func (storeMock *TransactionalStoreMock) Close() error

func (*TransactionalStoreMock) Features

func (storeMock *TransactionalStoreMock) Features() []state.Feature

func (*TransactionalStoreMock) Multi

Code generated by mockery v2.3.0. DO NOT EDIT.

func (*TransactionalStoreMock) MultiMaxSize

func (storeMock *TransactionalStoreMock) MultiMaxSize() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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