mocks

package
v0.0.0-...-c36b4a8 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package mocks provides generated mock implementations for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoerWatcherMock

type DoerWatcherMock struct {
	DoMock mDoerWatcherMockDo

	NewWatcherMock mDoerWatcherMockNewWatcher
	// contains filtered or unexported fields
}

DoerWatcherMock implements mm_tcs.DoerWatcher

func NewDoerWatcherMock

func NewDoerWatcherMock(t minimock.Tester) *DoerWatcherMock

NewDoerWatcherMock returns a mock for mm_tcs.DoerWatcher

func (*DoerWatcherMock) Do

func (mmDo *DoerWatcherMock) Do(req tarantool.Request) (fut *tarantool.Future)

Do implements mm_tcs.DoerWatcher

func (*DoerWatcherMock) DoAfterCounter

func (mmDo *DoerWatcherMock) DoAfterCounter() uint64

DoAfterCounter returns a count of finished DoerWatcherMock.Do invocations

func (*DoerWatcherMock) DoBeforeCounter

func (mmDo *DoerWatcherMock) DoBeforeCounter() uint64

DoBeforeCounter returns a count of DoerWatcherMock.Do invocations

func (*DoerWatcherMock) MinimockDoDone

func (m *DoerWatcherMock) MinimockDoDone() bool

MinimockDoDone returns true if the count of the Do invocations corresponds the number of defined expectations

func (*DoerWatcherMock) MinimockDoInspect

func (m *DoerWatcherMock) MinimockDoInspect()

MinimockDoInspect logs each unmet expectation

func (*DoerWatcherMock) MinimockFinish

func (m *DoerWatcherMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*DoerWatcherMock) MinimockNewWatcherDone

func (m *DoerWatcherMock) MinimockNewWatcherDone() bool

MinimockNewWatcherDone returns true if the count of the NewWatcher invocations corresponds the number of defined expectations

func (*DoerWatcherMock) MinimockNewWatcherInspect

func (m *DoerWatcherMock) MinimockNewWatcherInspect()

MinimockNewWatcherInspect logs each unmet expectation

func (*DoerWatcherMock) MinimockWait

func (m *DoerWatcherMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*DoerWatcherMock) NewWatcher

func (mmNewWatcher *DoerWatcherMock) NewWatcher(key string, callback tarantool.WatchCallback) (w1 tarantool.Watcher, err error)

NewWatcher implements mm_tcs.DoerWatcher

func (*DoerWatcherMock) NewWatcherAfterCounter

func (mmNewWatcher *DoerWatcherMock) NewWatcherAfterCounter() uint64

NewWatcherAfterCounter returns a count of finished DoerWatcherMock.NewWatcher invocations

func (*DoerWatcherMock) NewWatcherBeforeCounter

func (mmNewWatcher *DoerWatcherMock) NewWatcherBeforeCounter() uint64

NewWatcherBeforeCounter returns a count of DoerWatcherMock.NewWatcher invocations

type DoerWatcherMockDoExpectation

type DoerWatcherMockDoExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DoerWatcherMockDoExpectation specifies expectation struct of the DoerWatcher.Do

func (*DoerWatcherMockDoExpectation) Then

func (e *DoerWatcherMockDoExpectation) Then(fut *tarantool.Future) *DoerWatcherMock

Then sets up DoerWatcher.Do return parameters for the expectation previously defined by the When method

type DoerWatcherMockDoExpectationOrigins

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

DoerWatcherMockDoOrigins contains origins of expectations of the DoerWatcher.Do

type DoerWatcherMockDoParamPtrs

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

DoerWatcherMockDoParamPtrs contains pointers to parameters of the DoerWatcher.Do

type DoerWatcherMockDoParams

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

DoerWatcherMockDoParams contains parameters of the DoerWatcher.Do

type DoerWatcherMockDoResults

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

DoerWatcherMockDoResults contains results of the DoerWatcher.Do

type DoerWatcherMockNewWatcherExpectation

type DoerWatcherMockNewWatcherExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DoerWatcherMockNewWatcherExpectation specifies expectation struct of the DoerWatcher.NewWatcher

func (*DoerWatcherMockNewWatcherExpectation) Then

func (e *DoerWatcherMockNewWatcherExpectation) Then(w1 tarantool.Watcher, err error) *DoerWatcherMock

Then sets up DoerWatcher.NewWatcher return parameters for the expectation previously defined by the When method

type DoerWatcherMockNewWatcherExpectationOrigins

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

DoerWatcherMockNewWatcherOrigins contains origins of expectations of the DoerWatcher.NewWatcher

type DoerWatcherMockNewWatcherParamPtrs

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

DoerWatcherMockNewWatcherParamPtrs contains pointers to parameters of the DoerWatcher.NewWatcher

type DoerWatcherMockNewWatcherParams

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

DoerWatcherMockNewWatcherParams contains parameters of the DoerWatcher.NewWatcher

type DoerWatcherMockNewWatcherResults

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

DoerWatcherMockNewWatcherResults contains results of the DoerWatcher.NewWatcher

type DriverMock

type DriverMock struct {
	ExecuteMock mDriverMockExecute

	WatchMock mDriverMockWatch
	// contains filtered or unexported fields
}

DriverMock implements mm_driver.Driver

func NewDriverMock

func NewDriverMock(t minimock.Tester) *DriverMock

NewDriverMock returns a mock for mm_driver.Driver

func (*DriverMock) Execute

func (mmExecute *DriverMock) Execute(ctx context.Context, predicates []predicate.Predicate, thenOps []operation.Operation, elseOps []operation.Operation) (r1 tx.Response, err error)

Execute implements mm_driver.Driver

func (*DriverMock) ExecuteAfterCounter

func (mmExecute *DriverMock) ExecuteAfterCounter() uint64

ExecuteAfterCounter returns a count of finished DriverMock.Execute invocations

func (*DriverMock) ExecuteBeforeCounter

func (mmExecute *DriverMock) ExecuteBeforeCounter() uint64

ExecuteBeforeCounter returns a count of DriverMock.Execute invocations

func (*DriverMock) MinimockExecuteDone

func (m *DriverMock) MinimockExecuteDone() bool

MinimockExecuteDone returns true if the count of the Execute invocations corresponds the number of defined expectations

func (*DriverMock) MinimockExecuteInspect

func (m *DriverMock) MinimockExecuteInspect()

MinimockExecuteInspect logs each unmet expectation

func (*DriverMock) MinimockFinish

func (m *DriverMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*DriverMock) MinimockWait

func (m *DriverMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*DriverMock) MinimockWatchDone

func (m *DriverMock) MinimockWatchDone() bool

MinimockWatchDone returns true if the count of the Watch invocations corresponds the number of defined expectations

func (*DriverMock) MinimockWatchInspect

func (m *DriverMock) MinimockWatchInspect()

MinimockWatchInspect logs each unmet expectation

func (*DriverMock) Watch

func (mmWatch *DriverMock) Watch(ctx context.Context, key []byte, opts ...watch.Option) (ch1 <-chan watch.Event, f1 func(), err error)

Watch implements mm_driver.Driver

func (*DriverMock) WatchAfterCounter

func (mmWatch *DriverMock) WatchAfterCounter() uint64

WatchAfterCounter returns a count of finished DriverMock.Watch invocations

func (*DriverMock) WatchBeforeCounter

func (mmWatch *DriverMock) WatchBeforeCounter() uint64

WatchBeforeCounter returns a count of DriverMock.Watch invocations

type DriverMockExecuteExpectation

type DriverMockExecuteExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DriverMockExecuteExpectation specifies expectation struct of the Driver.Execute

func (*DriverMockExecuteExpectation) Then

Then sets up Driver.Execute return parameters for the expectation previously defined by the When method

type DriverMockExecuteExpectationOrigins

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

DriverMockExecuteOrigins contains origins of expectations of the Driver.Execute

type DriverMockExecuteParamPtrs

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

DriverMockExecuteParamPtrs contains pointers to parameters of the Driver.Execute

type DriverMockExecuteParams

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

DriverMockExecuteParams contains parameters of the Driver.Execute

type DriverMockExecuteResults

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

DriverMockExecuteResults contains results of the Driver.Execute

type DriverMockWatchExpectation

type DriverMockWatchExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

DriverMockWatchExpectation specifies expectation struct of the Driver.Watch

func (*DriverMockWatchExpectation) Then

func (e *DriverMockWatchExpectation) Then(ch1 <-chan watch.Event, f1 func(), err error) *DriverMock

Then sets up Driver.Watch return parameters for the expectation previously defined by the When method

type DriverMockWatchExpectationOrigins

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

DriverMockWatchOrigins contains origins of expectations of the Driver.Watch

type DriverMockWatchParamPtrs

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

DriverMockWatchParamPtrs contains pointers to parameters of the Driver.Watch

type DriverMockWatchParams

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

DriverMockWatchParams contains parameters of the Driver.Watch

type DriverMockWatchResults

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

DriverMockWatchResults contains results of the Driver.Watch

type ETCDTxnMock

type ETCDTxnMock struct {
	CommitMock mETCDTxnMockCommit

	ElseMock mETCDTxnMockElse

	IfMock mETCDTxnMockIf

	ThenMock mETCDTxnMockThen
	// contains filtered or unexported fields
}

ETCDTxnMock implements mm_clientv3.Txn

func NewETCDTxnMock

func NewETCDTxnMock(t minimock.Tester) *ETCDTxnMock

NewETCDTxnMock returns a mock for mm_clientv3.Txn

func (*ETCDTxnMock) Commit

func (mmCommit *ETCDTxnMock) Commit() (tp1 *mm_clientv3.TxnResponse, err error)

Commit implements mm_clientv3.Txn

func (*ETCDTxnMock) CommitAfterCounter

func (mmCommit *ETCDTxnMock) CommitAfterCounter() uint64

CommitAfterCounter returns a count of finished ETCDTxnMock.Commit invocations

func (*ETCDTxnMock) CommitBeforeCounter

func (mmCommit *ETCDTxnMock) CommitBeforeCounter() uint64

CommitBeforeCounter returns a count of ETCDTxnMock.Commit invocations

func (*ETCDTxnMock) Else

func (mmElse *ETCDTxnMock) Else(ops ...mm_clientv3.Op) (t1 mm_clientv3.Txn)

Else implements mm_clientv3.Txn

func (*ETCDTxnMock) ElseAfterCounter

func (mmElse *ETCDTxnMock) ElseAfterCounter() uint64

ElseAfterCounter returns a count of finished ETCDTxnMock.Else invocations

func (*ETCDTxnMock) ElseBeforeCounter

func (mmElse *ETCDTxnMock) ElseBeforeCounter() uint64

ElseBeforeCounter returns a count of ETCDTxnMock.Else invocations

func (*ETCDTxnMock) If

func (mmIf *ETCDTxnMock) If(cs ...mm_clientv3.Cmp) (t1 mm_clientv3.Txn)

If implements mm_clientv3.Txn

func (*ETCDTxnMock) IfAfterCounter

func (mmIf *ETCDTxnMock) IfAfterCounter() uint64

IfAfterCounter returns a count of finished ETCDTxnMock.If invocations

func (*ETCDTxnMock) IfBeforeCounter

func (mmIf *ETCDTxnMock) IfBeforeCounter() uint64

IfBeforeCounter returns a count of ETCDTxnMock.If invocations

func (*ETCDTxnMock) MinimockCommitDone

func (m *ETCDTxnMock) MinimockCommitDone() bool

MinimockCommitDone returns true if the count of the Commit invocations corresponds the number of defined expectations

func (*ETCDTxnMock) MinimockCommitInspect

func (m *ETCDTxnMock) MinimockCommitInspect()

MinimockCommitInspect logs each unmet expectation

func (*ETCDTxnMock) MinimockElseDone

func (m *ETCDTxnMock) MinimockElseDone() bool

MinimockElseDone returns true if the count of the Else invocations corresponds the number of defined expectations

func (*ETCDTxnMock) MinimockElseInspect

func (m *ETCDTxnMock) MinimockElseInspect()

MinimockElseInspect logs each unmet expectation

func (*ETCDTxnMock) MinimockFinish

func (m *ETCDTxnMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*ETCDTxnMock) MinimockIfDone

func (m *ETCDTxnMock) MinimockIfDone() bool

MinimockIfDone returns true if the count of the If invocations corresponds the number of defined expectations

func (*ETCDTxnMock) MinimockIfInspect

func (m *ETCDTxnMock) MinimockIfInspect()

MinimockIfInspect logs each unmet expectation

func (*ETCDTxnMock) MinimockThenDone

func (m *ETCDTxnMock) MinimockThenDone() bool

MinimockThenDone returns true if the count of the Then invocations corresponds the number of defined expectations

func (*ETCDTxnMock) MinimockThenInspect

func (m *ETCDTxnMock) MinimockThenInspect()

MinimockThenInspect logs each unmet expectation

func (*ETCDTxnMock) MinimockWait

func (m *ETCDTxnMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*ETCDTxnMock) Then

func (mmThen *ETCDTxnMock) Then(ops ...mm_clientv3.Op) (t1 mm_clientv3.Txn)

Then implements mm_clientv3.Txn

func (*ETCDTxnMock) ThenAfterCounter

func (mmThen *ETCDTxnMock) ThenAfterCounter() uint64

ThenAfterCounter returns a count of finished ETCDTxnMock.Then invocations

func (*ETCDTxnMock) ThenBeforeCounter

func (mmThen *ETCDTxnMock) ThenBeforeCounter() uint64

ThenBeforeCounter returns a count of ETCDTxnMock.Then invocations

type ETCDTxnMockCommitExpectation

type ETCDTxnMockCommitExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ETCDTxnMockCommitExpectation specifies expectation struct of the Txn.Commit

type ETCDTxnMockCommitResults

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

ETCDTxnMockCommitResults contains results of the Txn.Commit

type ETCDTxnMockElseExpectation

type ETCDTxnMockElseExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ETCDTxnMockElseExpectation specifies expectation struct of the Txn.Else

func (*ETCDTxnMockElseExpectation) Then

Then sets up Txn.Else return parameters for the expectation previously defined by the When method

type ETCDTxnMockElseExpectationOrigins

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

ETCDTxnMockElseOrigins contains origins of expectations of the Txn.Else

type ETCDTxnMockElseParamPtrs

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

ETCDTxnMockElseParamPtrs contains pointers to parameters of the Txn.Else

type ETCDTxnMockElseParams

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

ETCDTxnMockElseParams contains parameters of the Txn.Else

type ETCDTxnMockElseResults

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

ETCDTxnMockElseResults contains results of the Txn.Else

type ETCDTxnMockIfExpectation

type ETCDTxnMockIfExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ETCDTxnMockIfExpectation specifies expectation struct of the Txn.If

func (*ETCDTxnMockIfExpectation) Then

Then sets up Txn.If return parameters for the expectation previously defined by the When method

type ETCDTxnMockIfExpectationOrigins

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

ETCDTxnMockIfOrigins contains origins of expectations of the Txn.If

type ETCDTxnMockIfParamPtrs

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

ETCDTxnMockIfParamPtrs contains pointers to parameters of the Txn.If

type ETCDTxnMockIfParams

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

ETCDTxnMockIfParams contains parameters of the Txn.If

type ETCDTxnMockIfResults

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

ETCDTxnMockIfResults contains results of the Txn.If

type ETCDTxnMockThenExpectation

type ETCDTxnMockThenExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

ETCDTxnMockThenExpectation specifies expectation struct of the Txn.Then

func (*ETCDTxnMockThenExpectation) Then

Then sets up Txn.Then return parameters for the expectation previously defined by the When method

type ETCDTxnMockThenExpectationOrigins

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

ETCDTxnMockThenOrigins contains origins of expectations of the Txn.Then

type ETCDTxnMockThenParamPtrs

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

ETCDTxnMockThenParamPtrs contains pointers to parameters of the Txn.Then

type ETCDTxnMockThenParams

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

ETCDTxnMockThenParams contains parameters of the Txn.Then

type ETCDTxnMockThenResults

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

ETCDTxnMockThenResults contains results of the Txn.Then

type EtcdClientMock

type EtcdClientMock struct {
	TxnMock mEtcdClientMockTxn
	// contains filtered or unexported fields
}

EtcdClientMock implements mm_etcd.Client

func NewEtcdClientMock

func NewEtcdClientMock(t minimock.Tester) *EtcdClientMock

NewEtcdClientMock returns a mock for mm_etcd.Client

func (*EtcdClientMock) MinimockFinish

func (m *EtcdClientMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*EtcdClientMock) MinimockTxnDone

func (m *EtcdClientMock) MinimockTxnDone() bool

MinimockTxnDone returns true if the count of the Txn invocations corresponds the number of defined expectations

func (*EtcdClientMock) MinimockTxnInspect

func (m *EtcdClientMock) MinimockTxnInspect()

MinimockTxnInspect logs each unmet expectation

func (*EtcdClientMock) MinimockWait

func (m *EtcdClientMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*EtcdClientMock) Txn

func (mmTxn *EtcdClientMock) Txn(ctx context.Context) (t1 etcd.Txn)

Txn implements mm_etcd.Client

func (*EtcdClientMock) TxnAfterCounter

func (mmTxn *EtcdClientMock) TxnAfterCounter() uint64

TxnAfterCounter returns a count of finished EtcdClientMock.Txn invocations

func (*EtcdClientMock) TxnBeforeCounter

func (mmTxn *EtcdClientMock) TxnBeforeCounter() uint64

TxnBeforeCounter returns a count of EtcdClientMock.Txn invocations

type EtcdClientMockTxnExpectation

type EtcdClientMockTxnExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

EtcdClientMockTxnExpectation specifies expectation struct of the Client.Txn

func (*EtcdClientMockTxnExpectation) Then

Then sets up Client.Txn return parameters for the expectation previously defined by the When method

type EtcdClientMockTxnExpectationOrigins

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

EtcdClientMockTxnOrigins contains origins of expectations of the Client.Txn

type EtcdClientMockTxnParamPtrs

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

EtcdClientMockTxnParamPtrs contains pointers to parameters of the Client.Txn

type EtcdClientMockTxnParams

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

EtcdClientMockTxnParams contains parameters of the Client.Txn

type EtcdClientMockTxnResults

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

EtcdClientMockTxnResults contains results of the Client.Txn

type WatcherMock

type WatcherMock struct {
	UnregisterMock mWatcherMockUnregister
	// contains filtered or unexported fields
}

WatcherMock implements mm_tarantool.Watcher

func NewWatcherMock

func NewWatcherMock(t minimock.Tester) *WatcherMock

NewWatcherMock returns a mock for mm_tarantool.Watcher

func (*WatcherMock) MinimockFinish

func (m *WatcherMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*WatcherMock) MinimockUnregisterDone

func (m *WatcherMock) MinimockUnregisterDone() bool

MinimockUnregisterDone returns true if the count of the Unregister invocations corresponds the number of defined expectations

func (*WatcherMock) MinimockUnregisterInspect

func (m *WatcherMock) MinimockUnregisterInspect()

MinimockUnregisterInspect logs each unmet expectation

func (*WatcherMock) MinimockWait

func (m *WatcherMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*WatcherMock) Unregister

func (mmUnregister *WatcherMock) Unregister()

Unregister implements mm_tarantool.Watcher

func (*WatcherMock) UnregisterAfterCounter

func (mmUnregister *WatcherMock) UnregisterAfterCounter() uint64

UnregisterAfterCounter returns a count of finished WatcherMock.Unregister invocations

func (*WatcherMock) UnregisterBeforeCounter

func (mmUnregister *WatcherMock) UnregisterBeforeCounter() uint64

UnregisterBeforeCounter returns a count of WatcherMock.Unregister invocations

type WatcherMockUnregisterExpectation

type WatcherMockUnregisterExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

WatcherMockUnregisterExpectation specifies expectation struct of the Watcher.Unregister

Jump to

Keyboard shortcuts

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