testing

package
v1.12.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 57 Imported by: 2

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")
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 added in v1.12.0

func GetFakeMetadataItems() []commonapi.NameValuePair

func GetFakeProperties added in v1.12.0

func GetFakeProperties() map[string]string

func GetFreePorts added in v1.5.0

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 added in v1.12.0

func MatchContextInterface(v any) bool

func WaitForListeningAddress added in v1.5.0

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 added in v1.7.0

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

func (*FailingAppChannel) GetAppConfig added in v1.7.0

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

func (*FailingAppChannel) HealthProbe added in v1.9.0

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

func (*FailingAppChannel) InvokeMethod added in v1.7.0

func (*FailingAppChannel) SetAppHealth added in v1.9.0

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

type FailingBinding added in v1.7.0

type FailingBinding struct {
	Failure Failure
}

func (*FailingBinding) Close added in v1.7.0

func (m *FailingBinding) Close() error

func (*FailingBinding) Init added in v1.7.0

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

Init is a mock initialization method.

func (*FailingBinding) Invoke added in v1.7.0

Invoke is a mock invoke method.

func (*FailingBinding) Operations added in v1.7.0

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

Operations is a mock operations method.

type FailingConfigurationStore added in v1.7.0

type FailingConfigurationStore struct {
	Failure Failure
}

func (*FailingConfigurationStore) Get added in v1.7.0

func (*FailingConfigurationStore) Init added in v1.7.0

func (*FailingConfigurationStore) Subscribe added in v1.7.0

func (*FailingConfigurationStore) Unsubscribe added in v1.7.0

type FailingDirectMessaging added in v1.7.0

type FailingDirectMessaging struct {
	Failure           Failure
	SuccessStatusCode int
}

func (*FailingDirectMessaging) Invoke added in v1.7.0

func (*FailingDirectMessaging) SetAppChannel added in v1.10.0

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

func (*FailingDirectMessaging) SetHTTPEndpointsAppChannels added in v1.12.0

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

SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel

type FailingPubsub added in v1.7.0

type FailingPubsub struct {
	Failure Failure
}

FailingPubsub is a mock pubsub component object that simulates failures.

func (*FailingPubsub) BulkPublish added in v1.10.0

func (*FailingPubsub) BulkSubscribe added in v1.10.0

func (*FailingPubsub) Close added in v1.7.0

func (f *FailingPubsub) Close() error

func (*FailingPubsub) Features added in v1.7.0

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

func (*FailingPubsub) Init added in v1.7.0

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

func (*FailingPubsub) Publish added in v1.7.0

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

func (*FailingPubsub) Subscribe added in v1.7.0

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

type FailingSecretStore added in v1.7.0

type FailingSecretStore struct {
	Failure Failure
}

func (FailingSecretStore) BulkGetSecret added in v1.7.0

func (FailingSecretStore) Close added in v1.7.0

func (c FailingSecretStore) Close() error

func (FailingSecretStore) Features added in v1.9.0

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

func (FailingSecretStore) GetSecret added in v1.7.0

func (FailingSecretStore) Init added in v1.7.0

type FailingStatestore added in v1.7.0

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

func (*FailingStatestore) BulkDelete added in v1.7.0

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

func (*FailingStatestore) BulkGet added in v1.7.0

func (*FailingStatestore) BulkSet added in v1.7.0

func (*FailingStatestore) Close added in v1.7.0

func (f *FailingStatestore) Close() error

func (*FailingStatestore) Delete added in v1.7.0

func (*FailingStatestore) Features added in v1.7.0

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

func (*FailingStatestore) Get added in v1.7.0

func (*FailingStatestore) Init added in v1.7.0

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

func (*FailingStatestore) Multi added in v1.7.0

func (*FailingStatestore) Ping added in v1.7.0

func (f *FailingStatestore) Ping() error

func (*FailingStatestore) Query added in v1.7.0

func (*FailingStatestore) Set added in v1.7.0

type FailingSubtleCrypto added in v1.11.0

type FailingSubtleCrypto struct {
	FakeSubtleCrypto
	Failure Failure
}

func (FailingSubtleCrypto) Decrypt added in v1.11.0

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 added in v1.11.0

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 added in v1.11.0

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

func (FailingSubtleCrypto) Sign added in v1.11.0

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

func (FailingSubtleCrypto) UnwrapKey added in v1.11.0

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 added in v1.11.0

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

func (FailingSubtleCrypto) WrapKey added in v1.11.0

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 added in v1.7.0

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

func NewFailure added in v1.9.0

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

func (*Failure) CallCount added in v1.7.0

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

func (*Failure) PerformFailure added in v1.7.0

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

type FakeSecretStore added in v0.11.0

type FakeSecretStore struct{}

func (FakeSecretStore) BulkGetSecret added in v1.0.0

func (FakeSecretStore) Close added in v1.2.0

func (c FakeSecretStore) Close() error

func (FakeSecretStore) Features added in v1.9.0

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

func (FakeSecretStore) GetSecret added in v0.11.0

func (FakeSecretStore) Init added in v0.11.0

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

type FakeStateStore added in v1.11.0

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

func NewFakeStateStore added in v1.11.0

func NewFakeStateStore() *FakeStateStore

func (*FakeStateStore) BulkDelete added in v1.11.0

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

func (*FakeStateStore) BulkGet added in v1.11.0

func (*FakeStateStore) BulkSet added in v1.11.0

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

func (*FakeStateStore) CallCount added in v1.11.0

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

func (*FakeStateStore) Delete added in v1.11.0

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

func (*FakeStateStore) Features added in v1.11.0

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

func (*FakeStateStore) Get added in v1.11.0

func (*FakeStateStore) GetItems added in v1.12.0

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

func (*FakeStateStore) Init added in v1.11.0

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

func (*FakeStateStore) Multi added in v1.11.0

func (*FakeStateStore) MultiMaxSize added in v1.12.0

func (f *FakeStateStore) MultiMaxSize() int

func (*FakeStateStore) NewItem added in v1.11.0

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

func (*FakeStateStore) Ping added in v1.11.0

func (f *FakeStateStore) Ping() error

func (*FakeStateStore) Set added in v1.11.0

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

type FakeStateStoreItem added in v1.11.0

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

type FakeSubtleCrypto added in v1.11.0

type FakeSubtleCrypto struct{}

func (FakeSubtleCrypto) Close added in v1.11.0

func (c FakeSubtleCrypto) Close() error

func (FakeSubtleCrypto) Decrypt added in v1.11.0

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 added in v1.11.0

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 added in v1.11.0

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

func (FakeSubtleCrypto) GetKey added in v1.11.0

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

func (FakeSubtleCrypto) Init added in v1.11.0

func (FakeSubtleCrypto) Sign added in v1.11.0

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

func (FakeSubtleCrypto) SupportedEncryptionAlgorithms added in v1.11.0

func (c FakeSubtleCrypto) SupportedEncryptionAlgorithms() []string

func (FakeSubtleCrypto) SupportedSignatureAlgorithms added in v1.11.0

func (c FakeSubtleCrypto) SupportedSignatureAlgorithms() []string

func (FakeSubtleCrypto) UnwrapKey added in v1.11.0

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 added in v1.11.0

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

func (FakeSubtleCrypto) WrapKey added in v1.11.0

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 added in v1.9.0

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 added in v1.10.0

func (*InMemoryPubsub) BulkSubscribe added in v1.10.0

func (*InMemoryPubsub) Close added in v1.9.0

func (m *InMemoryPubsub) Close() error

Close is a mock close method.

func (*InMemoryPubsub) Features added in v1.9.0

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

func (*InMemoryPubsub) Init added in v1.9.0

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

Init is a mock initialization method.

func (*InMemoryPubsub) Publish added in v1.9.0

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

Publish is a mock publish method.

func (*InMemoryPubsub) SetBulkHandler added in v1.10.0

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

func (*InMemoryPubsub) SetHandler added in v1.9.0

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

func (*InMemoryPubsub) SetOnSubscribedTopicsChanged added in v1.9.0

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

func (*InMemoryPubsub) Subscribe added in v1.9.0

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 added in v1.0.0

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

MockBinding is a mock input/output component object.

func (*MockBinding) Close added in v1.2.0

func (m *MockBinding) Close() error

func (*MockBinding) Init added in v1.0.0

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

Init is a mock initialization method.

func (*MockBinding) Invoke added in v1.0.0

Invoke is a mock invoke method.

func (*MockBinding) Operations added in v1.0.0

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

Operations is a mock operations method.

func (*MockBinding) Read added in v1.0.0

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

Read is a mock read method.

func (*MockBinding) SetOnReadCloseCh added in v1.9.0

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

type MockConfigurationStore added in v1.7.0

type MockConfigurationStore struct {
	mock.Mock
}

MockConfigurationStore is an autogenerated mock type for the Store type

func (*MockConfigurationStore) Get added in v1.7.0

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

func (*MockConfigurationStore) Init added in v1.7.0

Init provides a mock function with given fields: metadata

func (*MockConfigurationStore) Subscribe added in v1.7.0

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

func (*MockConfigurationStore) Unsubscribe added in v1.7.0

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 added in v1.2.0

func (_m *MockDirectMessaging) Close() error

func (*MockDirectMessaging) Invoke

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

func (*MockDirectMessaging) SetAppChannel added in v1.10.0

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

func (*MockDirectMessaging) SetHTTPEndpointsAppChannels added in v1.12.0

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

SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel

type MockFieldIndexer added in v1.6.0

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

func (*MockFieldIndexer) IndexField added in v1.6.0

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

type MockManager added in v1.6.0

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

func NewMockManager added in v1.6.0

func NewMockManager() *MockManager

func (*MockManager) Add added in v1.6.0

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

func (*MockManager) AddHealthzCheck added in v1.6.0

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

func (*MockManager) AddMetricsExtraHandler added in v1.6.0

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

func (*MockManager) AddReadyzCheck added in v1.6.0

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

func (*MockManager) Elected added in v1.6.0

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

func (*MockManager) GetAPIReader added in v1.6.0

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

func (*MockManager) GetCache added in v1.6.0

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

func (*MockManager) GetClient added in v1.6.0

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

func (*MockManager) GetConfig added in v1.6.0

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

func (*MockManager) GetControllerOptions added in v1.7.0

func (m *MockManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec

func (*MockManager) GetEventRecorderFor added in v1.6.0

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

func (*MockManager) GetFieldIndexer added in v1.6.0

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

func (*MockManager) GetIndexerFunc added in v1.6.0

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

func (*MockManager) GetLogger added in v1.6.0

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

func (*MockManager) GetRESTMapper added in v1.6.0

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

func (*MockManager) GetRunnables added in v1.6.0

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

func (*MockManager) GetScheme added in v1.6.0

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

func (*MockManager) GetWebhookServer added in v1.6.0

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

func (*MockManager) SetFields added in v1.6.0

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

func (*MockManager) Start added in v1.6.0

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 added in v1.10.0

BulkPublish is a mock bulk publish method.

func (*MockPubSub) BulkSubscribe added in v1.10.0

BulkSubscribe is a mock bulk subscribe method.

func (*MockPubSub) Close added in v1.0.0

func (m *MockPubSub) Close() error

Close is a mock close method.

func (*MockPubSub) Features added in v1.0.0

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 added in v1.0.0

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 added in v1.10.0

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) Outbox added in v1.12.0

func (a *MockPubSubAdapter) Outbox() outbox.Outbox

func (*MockPubSubAdapter) Publish added in v1.0.0

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 added in v1.5.0

type MockQuerier struct {
	mock.Mock
}

MockQuerier is an autogenerated mock type for the Querier type

func (*MockQuerier) Query added in v1.5.0

Query provides a mock function with given fields: req

type MockResolver added in v1.2.0

type MockResolver struct {
	mock.Mock
}

MockResolver is a mock nameresolution component object.

func (*MockResolver) Init added in v1.2.0

func (m *MockResolver) Init(metadata nr.Metadata) error

Init is a mock initialization method.

func (*MockResolver) ResolveID added in v1.2.0

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

ResolveID is a mock resolve method.

type MockStateStore added in v1.0.0

type MockStateStore struct {
	mock.Mock
}

MockStateStore is an autogenerated mock type for the Store type

func (*MockStateStore) BulkDelete added in v1.0.0

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

func (*MockStateStore) BulkGet added in v1.0.0

func (*MockStateStore) BulkSet added in v1.0.0

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

func (*MockStateStore) Close added in v1.2.0

func (_m *MockStateStore) Close() error

func (*MockStateStore) Delete added in v1.0.0

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

Delete provides a mock function with given fields: req

func (*MockStateStore) Features added in v1.1.0

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

Features returns the features for this state store.

func (*MockStateStore) Get added in v1.0.0

Get provides a mock function with given fields: req

func (*MockStateStore) Init added in v1.0.0

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

Init provides a mock function with given fields: metadata

func (*MockStateStore) Ping added in v1.3.0

func (_m *MockStateStore) Ping() error

Ping provides a mock function

func (*MockStateStore) Set added in v1.0.0

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

Set provides a mock function with given fields: req

type MockStore added in v1.8.0

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

MockStore is a mock of Store interface.

func NewMockStore added in v1.8.0

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance.

func (*MockStore) EXPECT added in v1.8.0

func (m *MockStore) EXPECT() *MockStoreMockRecorder

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

func (*MockStore) InitLockStore added in v1.8.0

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

InitLockStore mocks base method.

func (*MockStore) TryLock added in v1.8.0

TryLock mocks base method.

func (*MockStore) Unlock added in v1.8.0

Unlock mocks base method.

type MockStoreMockRecorder added in v1.8.0

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

MockStoreMockRecorder is the mock recorder for MockStore.

func (*MockStoreMockRecorder) InitLockStore added in v1.8.0

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

InitLockStore indicates an expected call of InitLockStore.

func (*MockStoreMockRecorder) TryLock added in v1.8.0

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

TryLock indicates an expected call of TryLock.

func (*MockStoreMockRecorder) Unlock added in v1.8.0

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

Unlock indicates an expected call of Unlock.

type MockWorkflow added in v1.11.0

type MockWorkflow struct{}

func (*MockWorkflow) Get added in v1.11.0

func (*MockWorkflow) Init added in v1.11.0

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

func (*MockWorkflow) Pause added in v1.11.0

func (*MockWorkflow) Purge added in v1.11.0

func (*MockWorkflow) RaiseEvent added in v1.11.0

func (*MockWorkflow) Resume added in v1.11.0

func (*MockWorkflow) Start added in v1.11.0

func (*MockWorkflow) Terminate added in v1.11.0

type TransactionalStoreMock added in v1.0.0

type TransactionalStoreMock struct {
	MaxOperations int
	MockStateStore
}

func (*TransactionalStoreMock) Close added in v1.2.0

func (storeMock *TransactionalStoreMock) Close() error

func (*TransactionalStoreMock) Features added in v1.1.0

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

func (*TransactionalStoreMock) Multi added in v1.0.0

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

func (*TransactionalStoreMock) MultiMaxSize added in v1.12.0

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