From 53023b4813e8a40ab6677981e40ac9ad7751586f Mon Sep 17 00:00:00 2001 From: Sergey Vilgelm <523825+SVilgelm@users.noreply.github.com> Date: Sun, 26 Nov 2023 19:08:08 -0800 Subject: [PATCH] regenerate mockery mocks (#112) --- mocks/mockery/change_stream.go | 32 +++++++++ mocks/mockery/client.go | 48 ++++++++++++++ mocks/mockery/client_encryption.go | 52 +++++++++++++++ mocks/mockery/collection.go | 100 +++++++++++++++++++++++++++++ mocks/mockery/cursor.go | 36 +++++++++++ mocks/mockery/database.go | 64 ++++++++++++++++++ mocks/mockery/index_view.go | 24 +++++++ mocks/mockery/search_index_view.go | 20 ++++++ mocks/mockery/session.go | 40 ++++++++++++ mocks/mockery/session_context.go | 56 ++++++++++++++++ mocks/mockery/single_result.go | 16 +++++ 11 files changed, 488 insertions(+) diff --git a/mocks/mockery/change_stream.go b/mocks/mockery/change_stream.go index f21580a..d818b80 100644 --- a/mocks/mockery/change_stream.go +++ b/mocks/mockery/change_stream.go @@ -27,6 +27,10 @@ func (_m *ChangeStream) EXPECT() *ChangeStream_Expecter { func (_m *ChangeStream) Close(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -69,6 +73,10 @@ func (_c *ChangeStream_Close_Call) RunAndReturn(run func(context.Context) error) func (_m *ChangeStream) Current() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Current") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -112,6 +120,10 @@ func (_c *ChangeStream_Current_Call) RunAndReturn(run func() bson.Raw) *ChangeSt func (_m *ChangeStream) Decode(val interface{}) error { ret := _m.Called(val) + if len(ret) == 0 { + panic("no return value specified for Decode") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(val) @@ -154,6 +166,10 @@ func (_c *ChangeStream_Decode_Call) RunAndReturn(run func(interface{}) error) *C func (_m *ChangeStream) Err() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -195,6 +211,10 @@ func (_c *ChangeStream_Err_Call) RunAndReturn(run func() error) *ChangeStream_Er func (_m *ChangeStream) ID() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -236,6 +256,10 @@ func (_c *ChangeStream_ID_Call) RunAndReturn(run func() int64) *ChangeStream_ID_ func (_m *ChangeStream) Next(ctx context.Context) bool { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Next") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx) @@ -278,6 +302,10 @@ func (_c *ChangeStream_Next_Call) RunAndReturn(run func(context.Context) bool) * func (_m *ChangeStream) ResumeToken() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ResumeToken") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -354,6 +382,10 @@ func (_c *ChangeStream_SetBatchSize_Call) RunAndReturn(run func(int32)) *ChangeS func (_m *ChangeStream) TryNext(ctx context.Context) bool { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for TryNext") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx) diff --git a/mocks/mockery/client.go b/mocks/mockery/client.go index 119321a..bc42f9a 100644 --- a/mocks/mockery/client.go +++ b/mocks/mockery/client.go @@ -34,6 +34,10 @@ func (_m *Client) EXPECT() *Client_Expecter { func (_m *Client) Connect(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Connect") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -83,6 +87,10 @@ func (_m *Client) Database(name string, opts ...*options.DatabaseOptions) mongoi _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Database") + } + var r0 mongoifc.Database if rf, ok := ret.Get(0).(func(string, ...*options.DatabaseOptions) mongoifc.Database); ok { r0 = rf(name, opts...) @@ -135,6 +143,10 @@ func (_c *Client_Database_Call) RunAndReturn(run func(string, ...*options.Databa func (_m *Client) Disconnect(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Disconnect") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -184,6 +196,10 @@ func (_m *Client) ListDatabaseNames(ctx context.Context, filter interface{}, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListDatabaseNames") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ListDatabasesOptions) ([]string, error)); ok { @@ -254,6 +270,10 @@ func (_m *Client) ListDatabases(ctx context.Context, filter interface{}, opts .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListDatabases") + } + var r0 mongo.ListDatabasesResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ListDatabasesOptions) (mongo.ListDatabasesResult, error)); ok { @@ -315,6 +335,10 @@ func (_c *Client_ListDatabases_Call) RunAndReturn(run func(context.Context, inte func (_m *Client) NumberSessionsInProgress() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NumberSessionsInProgress") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -356,6 +380,10 @@ func (_c *Client_NumberSessionsInProgress_Call) RunAndReturn(run func() int) *Cl func (_m *Client) Ping(ctx context.Context, rp *readpref.ReadPref) error { ret := _m.Called(ctx, rp) + if len(ret) == 0 { + panic("no return value specified for Ping") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *readpref.ReadPref) error); ok { r0 = rf(ctx, rp) @@ -405,6 +433,10 @@ func (_m *Client) StartSession(opts ...*options.SessionOptions) (mongoifc.Sessio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartSession") + } + var r0 mongoifc.Session var r1 error if rf, ok := ret.Get(0).(func(...*options.SessionOptions) (mongoifc.Session, error)); ok { @@ -466,6 +498,10 @@ func (_c *Client_StartSession_Call) RunAndReturn(run func(...*options.SessionOpt func (_m *Client) Timeout() *time.Duration { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Timeout") + } + var r0 *time.Duration if rf, ok := ret.Get(0).(func() *time.Duration); ok { r0 = rf() @@ -509,6 +545,10 @@ func (_c *Client_Timeout_Call) RunAndReturn(run func() *time.Duration) *Client_T func (_m *Client) UseSession(ctx context.Context, fn func(mongoifc.SessionContext) error) error { ret := _m.Called(ctx, fn) + if len(ret) == 0 { + panic("no return value specified for UseSession") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, func(mongoifc.SessionContext) error) error); ok { r0 = rf(ctx, fn) @@ -552,6 +592,10 @@ func (_c *Client_UseSession_Call) RunAndReturn(run func(context.Context, func(mo func (_m *Client) UseSessionWithOptions(ctx context.Context, opts *options.SessionOptions, fn func(mongoifc.SessionContext) error) error { ret := _m.Called(ctx, opts, fn) + if len(ret) == 0 { + panic("no return value specified for UseSessionWithOptions") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *options.SessionOptions, func(mongoifc.SessionContext) error) error); ok { r0 = rf(ctx, opts, fn) @@ -603,6 +647,10 @@ func (_m *Client) Watch(ctx context.Context, pipeline interface{}, opts ...*opti _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 mongoifc.ChangeStream var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ChangeStreamOptions) (mongoifc.ChangeStream, error)); ok { diff --git a/mocks/mockery/client_encryption.go b/mocks/mockery/client_encryption.go index f89fda3..3679cb1 100644 --- a/mocks/mockery/client_encryption.go +++ b/mocks/mockery/client_encryption.go @@ -35,6 +35,10 @@ func (_m *ClientEncryption) EXPECT() *ClientEncryption_Expecter { func (_m *ClientEncryption) AddKeyAltName(ctx context.Context, id primitive.Binary, keyAltName string) mongoifc.SingleResult { ret := _m.Called(ctx, id, keyAltName) + if len(ret) == 0 { + panic("no return value specified for AddKeyAltName") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, primitive.Binary, string) mongoifc.SingleResult); ok { r0 = rf(ctx, id, keyAltName) @@ -81,6 +85,10 @@ func (_c *ClientEncryption_AddKeyAltName_Call) RunAndReturn(run func(context.Con func (_m *ClientEncryption) Close(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -130,6 +138,10 @@ func (_m *ClientEncryption) CreateDataKey(ctx context.Context, kmsProvider strin _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateDataKey") + } + var r0 primitive.Binary var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, ...*options.DataKeyOptions) (primitive.Binary, error)); ok { @@ -191,6 +203,10 @@ func (_c *ClientEncryption_CreateDataKey_Call) RunAndReturn(run func(context.Con func (_m *ClientEncryption) CreateEncryptedCollection(ctx context.Context, db mongoifc.Database, coll string, createOpts *options.CreateCollectionOptions, kmsProvider string, masterKey interface{}) (mongoifc.Collection, primitive.M, error) { ret := _m.Called(ctx, db, coll, createOpts, kmsProvider, masterKey) + if len(ret) == 0 { + panic("no return value specified for CreateEncryptedCollection") + } + var r0 mongoifc.Collection var r1 primitive.M var r2 error @@ -259,6 +275,10 @@ func (_c *ClientEncryption_CreateEncryptedCollection_Call) RunAndReturn(run func func (_m *ClientEncryption) Decrypt(ctx context.Context, val primitive.Binary) (bson.RawValue, error) { ret := _m.Called(ctx, val) + if len(ret) == 0 { + panic("no return value specified for Decrypt") + } + var r0 bson.RawValue var r1 error if rf, ok := ret.Get(0).(func(context.Context, primitive.Binary) (bson.RawValue, error)); ok { @@ -312,6 +332,10 @@ func (_c *ClientEncryption_Decrypt_Call) RunAndReturn(run func(context.Context, func (_m *ClientEncryption) DeleteKey(ctx context.Context, id primitive.Binary) (*mongo.DeleteResult, error) { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for DeleteKey") + } + var r0 *mongo.DeleteResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, primitive.Binary) (*mongo.DeleteResult, error)); ok { @@ -374,6 +398,10 @@ func (_m *ClientEncryption) Encrypt(ctx context.Context, val bson.RawValue, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Encrypt") + } + var r0 primitive.Binary var r1 error if rf, ok := ret.Get(0).(func(context.Context, bson.RawValue, ...*options.EncryptOptions) (primitive.Binary, error)); ok { @@ -442,6 +470,10 @@ func (_m *ClientEncryption) EncryptExpression(ctx context.Context, expr interfac _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for EncryptExpression") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.EncryptOptions) error); ok { r0 = rf(ctx, expr, result, opts...) @@ -494,6 +526,10 @@ func (_c *ClientEncryption_EncryptExpression_Call) RunAndReturn(run func(context func (_m *ClientEncryption) GetKey(ctx context.Context, id primitive.Binary) mongoifc.SingleResult { ret := _m.Called(ctx, id) + if len(ret) == 0 { + panic("no return value specified for GetKey") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, primitive.Binary) mongoifc.SingleResult); ok { r0 = rf(ctx, id) @@ -539,6 +575,10 @@ func (_c *ClientEncryption_GetKey_Call) RunAndReturn(run func(context.Context, p func (_m *ClientEncryption) GetKeyByAltName(ctx context.Context, keyAltName string) mongoifc.SingleResult { ret := _m.Called(ctx, keyAltName) + if len(ret) == 0 { + panic("no return value specified for GetKeyByAltName") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, string) mongoifc.SingleResult); ok { r0 = rf(ctx, keyAltName) @@ -584,6 +624,10 @@ func (_c *ClientEncryption_GetKeyByAltName_Call) RunAndReturn(run func(context.C func (_m *ClientEncryption) GetKeys(ctx context.Context) (mongoifc.Cursor, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetKeys") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context) (mongoifc.Cursor, error)); ok { @@ -638,6 +682,10 @@ func (_c *ClientEncryption_GetKeys_Call) RunAndReturn(run func(context.Context) func (_m *ClientEncryption) RemoveKeyAltName(ctx context.Context, id primitive.Binary, keyAltName string) mongoifc.SingleResult { ret := _m.Called(ctx, id, keyAltName) + if len(ret) == 0 { + panic("no return value specified for RemoveKeyAltName") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, primitive.Binary, string) mongoifc.SingleResult); ok { r0 = rf(ctx, id, keyAltName) @@ -691,6 +739,10 @@ func (_m *ClientEncryption) RewrapManyDataKey(ctx context.Context, filter interf _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RewrapManyDataKey") + } + var r0 *mongo.RewrapManyDataKeyResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.RewrapManyDataKeyOptions) (*mongo.RewrapManyDataKeyResult, error)); ok { diff --git a/mocks/mockery/collection.go b/mocks/mockery/collection.go index 016fd5f..a061bee 100644 --- a/mocks/mockery/collection.go +++ b/mocks/mockery/collection.go @@ -37,6 +37,10 @@ func (_m *Collection) Aggregate(ctx context.Context, pipeline interface{}, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Aggregate") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.AggregateOptions) (mongoifc.Cursor, error)); ok { @@ -107,6 +111,10 @@ func (_m *Collection) BulkWrite(ctx context.Context, models []mongo.WriteModel, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for BulkWrite") + } + var r0 *mongo.BulkWriteResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, []mongo.WriteModel, ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)); ok { @@ -176,6 +184,10 @@ func (_m *Collection) Clone(opts ...*options.CollectionOptions) (mongoifc.Collec _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Clone") + } + var r0 mongoifc.Collection var r1 error if rf, ok := ret.Get(0).(func(...*options.CollectionOptions) (mongoifc.Collection, error)); ok { @@ -244,6 +256,10 @@ func (_m *Collection) CountDocuments(ctx context.Context, filter interface{}, op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CountDocuments") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.CountOptions) (int64, error)); ok { @@ -305,6 +321,10 @@ func (_c *Collection_CountDocuments_Call) RunAndReturn(run func(context.Context, func (_m *Collection) Database() mongoifc.Database { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Database") + } + var r0 mongoifc.Database if rf, ok := ret.Get(0).(func() mongoifc.Database); ok { r0 = rf() @@ -355,6 +375,10 @@ func (_m *Collection) DeleteMany(ctx context.Context, filter interface{}, opts . _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteMany") + } + var r0 *mongo.DeleteResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.DeleteOptions) (*mongo.DeleteResult, error)); ok { @@ -425,6 +449,10 @@ func (_m *Collection) DeleteOne(ctx context.Context, filter interface{}, opts .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DeleteOne") + } + var r0 *mongo.DeleteResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.DeleteOptions) (*mongo.DeleteResult, error)); ok { @@ -495,6 +523,10 @@ func (_m *Collection) Distinct(ctx context.Context, fieldName string, filter int _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Distinct") + } + var r0 []interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, interface{}, ...*options.DistinctOptions) ([]interface{}, error)); ok { @@ -559,6 +591,10 @@ func (_c *Collection_Distinct_Call) RunAndReturn(run func(context.Context, strin func (_m *Collection) Drop(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Drop") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -608,6 +644,10 @@ func (_m *Collection) EstimatedDocumentCount(ctx context.Context, opts ...*optio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for EstimatedDocumentCount") + } + var r0 int64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, ...*options.EstimatedDocumentCountOptions) (int64, error)); ok { @@ -675,6 +715,10 @@ func (_m *Collection) Find(ctx context.Context, filter interface{}, opts ...*opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Find") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.FindOptions) (mongoifc.Cursor, error)); ok { @@ -745,6 +789,10 @@ func (_m *Collection) FindOne(ctx context.Context, filter interface{}, opts ...* _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindOne") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.FindOneOptions) mongoifc.SingleResult); ok { r0 = rf(ctx, filter, opts...) @@ -805,6 +853,10 @@ func (_m *Collection) FindOneAndDelete(ctx context.Context, filter interface{}, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindOneAndDelete") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.FindOneAndDeleteOptions) mongoifc.SingleResult); ok { r0 = rf(ctx, filter, opts...) @@ -865,6 +917,10 @@ func (_m *Collection) FindOneAndReplace(ctx context.Context, filter interface{}, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindOneAndReplace") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.FindOneAndReplaceOptions) mongoifc.SingleResult); ok { r0 = rf(ctx, filter, replacement, opts...) @@ -926,6 +982,10 @@ func (_m *Collection) FindOneAndUpdate(ctx context.Context, filter interface{}, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for FindOneAndUpdate") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.FindOneAndUpdateOptions) mongoifc.SingleResult); ok { r0 = rf(ctx, filter, update, opts...) @@ -980,6 +1040,10 @@ func (_c *Collection_FindOneAndUpdate_Call) RunAndReturn(run func(context.Contex func (_m *Collection) Indexes() mongoifc.IndexView { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Indexes") + } + var r0 mongoifc.IndexView if rf, ok := ret.Get(0).(func() mongoifc.IndexView); ok { r0 = rf() @@ -1030,6 +1094,10 @@ func (_m *Collection) InsertMany(ctx context.Context, documents []interface{}, o _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InsertMany") + } + var r0 *mongo.InsertManyResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, []interface{}, ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)); ok { @@ -1100,6 +1168,10 @@ func (_m *Collection) InsertOne(ctx context.Context, document interface{}, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for InsertOne") + } + var r0 *mongo.InsertOneResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)); ok { @@ -1163,6 +1235,10 @@ func (_c *Collection_InsertOne_Call) RunAndReturn(run func(context.Context, inte func (_m *Collection) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -1211,6 +1287,10 @@ func (_m *Collection) ReplaceOne(ctx context.Context, filter interface{}, replac _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ReplaceOne") + } + var r0 *mongo.UpdateResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.ReplaceOptions) (*mongo.UpdateResult, error)); ok { @@ -1275,6 +1355,10 @@ func (_c *Collection_ReplaceOne_Call) RunAndReturn(run func(context.Context, int func (_m *Collection) SearchIndexes() mongoifc.SearchIndexView { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SearchIndexes") + } + var r0 mongoifc.SearchIndexView if rf, ok := ret.Get(0).(func() mongoifc.SearchIndexView); ok { r0 = rf() @@ -1325,6 +1409,10 @@ func (_m *Collection) UpdateByID(ctx context.Context, id interface{}, update int _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateByID") + } + var r0 *mongo.UpdateResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.UpdateOptions) (*mongo.UpdateResult, error)); ok { @@ -1396,6 +1484,10 @@ func (_m *Collection) UpdateMany(ctx context.Context, filter interface{}, update _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateMany") + } + var r0 *mongo.UpdateResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.UpdateOptions) (*mongo.UpdateResult, error)); ok { @@ -1467,6 +1559,10 @@ func (_m *Collection) UpdateOne(ctx context.Context, filter interface{}, update _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateOne") + } + var r0 *mongo.UpdateResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, interface{}, ...*options.UpdateOptions) (*mongo.UpdateResult, error)); ok { @@ -1538,6 +1634,10 @@ func (_m *Collection) Watch(ctx context.Context, pipeline interface{}, opts ...* _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 mongoifc.ChangeStream var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ChangeStreamOptions) (mongoifc.ChangeStream, error)); ok { diff --git a/mocks/mockery/cursor.go b/mocks/mockery/cursor.go index d9609b7..2031c39 100644 --- a/mocks/mockery/cursor.go +++ b/mocks/mockery/cursor.go @@ -29,6 +29,10 @@ func (_m *Cursor) EXPECT() *Cursor_Expecter { func (_m *Cursor) All(ctx context.Context, results interface{}) error { ret := _m.Called(ctx, results) + if len(ret) == 0 { + panic("no return value specified for All") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { r0 = rf(ctx, results) @@ -72,6 +76,10 @@ func (_c *Cursor_All_Call) RunAndReturn(run func(context.Context, interface{}) e func (_m *Cursor) Close(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -114,6 +122,10 @@ func (_c *Cursor_Close_Call) RunAndReturn(run func(context.Context) error) *Curs func (_m *Cursor) Current() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Current") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -157,6 +169,10 @@ func (_c *Cursor_Current_Call) RunAndReturn(run func() bson.Raw) *Cursor_Current func (_m *Cursor) Decode(val interface{}) error { ret := _m.Called(val) + if len(ret) == 0 { + panic("no return value specified for Decode") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(val) @@ -199,6 +215,10 @@ func (_c *Cursor_Decode_Call) RunAndReturn(run func(interface{}) error) *Cursor_ func (_m *Cursor) Err() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -240,6 +260,10 @@ func (_c *Cursor_Err_Call) RunAndReturn(run func() error) *Cursor_Err_Call { func (_m *Cursor) ID() int64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 int64 if rf, ok := ret.Get(0).(func() int64); ok { r0 = rf() @@ -281,6 +305,10 @@ func (_c *Cursor_ID_Call) RunAndReturn(run func() int64) *Cursor_ID_Call { func (_m *Cursor) Next(ctx context.Context) bool { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Next") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx) @@ -323,6 +351,10 @@ func (_c *Cursor_Next_Call) RunAndReturn(run func(context.Context) bool) *Cursor func (_m *Cursor) RemainingBatchLength() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for RemainingBatchLength") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -463,6 +495,10 @@ func (_c *Cursor_SetMaxTime_Call) RunAndReturn(run func(time.Duration)) *Cursor_ func (_m *Cursor) TryNext(ctx context.Context) bool { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for TryNext") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = rf(ctx) diff --git a/mocks/mockery/database.go b/mocks/mockery/database.go index 2f0d994..2d01805 100644 --- a/mocks/mockery/database.go +++ b/mocks/mockery/database.go @@ -43,6 +43,10 @@ func (_m *Database) Aggregate(ctx context.Context, pipeline interface{}, opts .. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Aggregate") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.AggregateOptions) (mongoifc.Cursor, error)); ok { @@ -106,6 +110,10 @@ func (_c *Database_Aggregate_Call) RunAndReturn(run func(context.Context, interf func (_m *Database) Client() mongoifc.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Client") + } + var r0 mongoifc.Client if rf, ok := ret.Get(0).(func() mongoifc.Client); ok { r0 = rf() @@ -156,6 +164,10 @@ func (_m *Database) Collection(name string, opts ...*options.CollectionOptions) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Collection") + } + var r0 mongoifc.Collection if rf, ok := ret.Get(0).(func(string, ...*options.CollectionOptions) mongoifc.Collection); ok { r0 = rf(name, opts...) @@ -215,6 +227,10 @@ func (_m *Database) CreateCollection(ctx context.Context, name string, opts ...* _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, ...*options.CreateCollectionOptions) error); ok { r0 = rf(ctx, name, opts...) @@ -273,6 +289,10 @@ func (_m *Database) CreateView(ctx context.Context, viewName string, viewOn stri _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateView") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, string, interface{}, ...*options.CreateViewOptions) error); ok { r0 = rf(ctx, viewName, viewOn, pipeline, opts...) @@ -326,6 +346,10 @@ func (_c *Database_CreateView_Call) RunAndReturn(run func(context.Context, strin func (_m *Database) Drop(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Drop") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -375,6 +399,10 @@ func (_m *Database) ListCollectionNames(ctx context.Context, filter interface{}, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListCollectionNames") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ListCollectionsOptions) ([]string, error)); ok { @@ -445,6 +473,10 @@ func (_m *Database) ListCollectionSpecifications(ctx context.Context, filter int _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListCollectionSpecifications") + } + var r0 []*mongo.CollectionSpecification var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ListCollectionsOptions) ([]*mongo.CollectionSpecification, error)); ok { @@ -515,6 +547,10 @@ func (_m *Database) ListCollections(ctx context.Context, filter interface{}, opt _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListCollections") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ListCollectionsOptions) (mongoifc.Cursor, error)); ok { @@ -578,6 +614,10 @@ func (_c *Database_ListCollections_Call) RunAndReturn(run func(context.Context, func (_m *Database) Name() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -619,6 +659,10 @@ func (_c *Database_Name_Call) RunAndReturn(run func() string) *Database_Name_Cal func (_m *Database) ReadConcern() *readconcern.ReadConcern { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ReadConcern") + } + var r0 *readconcern.ReadConcern if rf, ok := ret.Get(0).(func() *readconcern.ReadConcern); ok { r0 = rf() @@ -662,6 +706,10 @@ func (_c *Database_ReadConcern_Call) RunAndReturn(run func() *readconcern.ReadCo func (_m *Database) ReadPreference() *readpref.ReadPref { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ReadPreference") + } + var r0 *readpref.ReadPref if rf, ok := ret.Get(0).(func() *readpref.ReadPref); ok { r0 = rf() @@ -712,6 +760,10 @@ func (_m *Database) RunCommand(ctx context.Context, runCommand interface{}, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RunCommand") + } + var r0 mongoifc.SingleResult if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.RunCmdOptions) mongoifc.SingleResult); ok { r0 = rf(ctx, runCommand, opts...) @@ -772,6 +824,10 @@ func (_m *Database) RunCommandCursor(ctx context.Context, runCommand interface{} _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for RunCommandCursor") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.RunCmdOptions) (mongoifc.Cursor, error)); ok { @@ -842,6 +898,10 @@ func (_m *Database) Watch(ctx context.Context, pipeline interface{}, opts ...*op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for Watch") + } + var r0 mongoifc.ChangeStream var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, ...*options.ChangeStreamOptions) (mongoifc.ChangeStream, error)); ok { @@ -905,6 +965,10 @@ func (_c *Database_Watch_Call) RunAndReturn(run func(context.Context, interface{ func (_m *Database) WriteConcern() *writeconcern.WriteConcern { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for WriteConcern") + } + var r0 *writeconcern.WriteConcern if rf, ok := ret.Get(0).(func() *writeconcern.WriteConcern); ok { r0 = rf() diff --git a/mocks/mockery/index_view.go b/mocks/mockery/index_view.go index 276b893..6fdf470 100644 --- a/mocks/mockery/index_view.go +++ b/mocks/mockery/index_view.go @@ -40,6 +40,10 @@ func (_m *IndexView) CreateMany(ctx context.Context, models []mongo.IndexModel, _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateMany") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, []mongo.IndexModel, ...*options.CreateIndexesOptions) ([]string, error)); ok { @@ -110,6 +114,10 @@ func (_m *IndexView) CreateOne(ctx context.Context, model mongo.IndexModel, opts _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateOne") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, mongo.IndexModel, ...*options.CreateIndexesOptions) (string, error)); ok { @@ -178,6 +186,10 @@ func (_m *IndexView) DropAll(ctx context.Context, opts ...*options.DropIndexesOp _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DropAll") + } + var r0 bson.Raw var r1 error if rf, ok := ret.Get(0).(func(context.Context, ...*options.DropIndexesOptions) (bson.Raw, error)); ok { @@ -247,6 +259,10 @@ func (_m *IndexView) DropOne(ctx context.Context, name string, opts ...*options. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DropOne") + } + var r0 bson.Raw var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, ...*options.DropIndexesOptions) (bson.Raw, error)); ok { @@ -317,6 +333,10 @@ func (_m *IndexView) List(ctx context.Context, opts ...*options.ListIndexesOptio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, ...*options.ListIndexesOptions) (mongoifc.Cursor, error)); ok { @@ -386,6 +406,10 @@ func (_m *IndexView) ListSpecifications(ctx context.Context, opts ...*options.Li _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for ListSpecifications") + } + var r0 []*mongo.IndexSpecification var r1 error if rf, ok := ret.Get(0).(func(context.Context, ...*options.ListIndexesOptions) ([]*mongo.IndexSpecification, error)); ok { diff --git a/mocks/mockery/search_index_view.go b/mocks/mockery/search_index_view.go index c952e2c..6f0ee10 100644 --- a/mocks/mockery/search_index_view.go +++ b/mocks/mockery/search_index_view.go @@ -37,6 +37,10 @@ func (_m *SearchIndexView) CreateMany(ctx context.Context, models []mongo.Search _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateMany") + } + var r0 []string var r1 error if rf, ok := ret.Get(0).(func(context.Context, []mongo.SearchIndexModel, ...*options.CreateSearchIndexesOptions) ([]string, error)); ok { @@ -107,6 +111,10 @@ func (_m *SearchIndexView) CreateOne(ctx context.Context, model mongo.SearchInde _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for CreateOne") + } + var r0 string var r1 error if rf, ok := ret.Get(0).(func(context.Context, mongo.SearchIndexModel, ...*options.CreateSearchIndexesOptions) (string, error)); ok { @@ -175,6 +183,10 @@ func (_m *SearchIndexView) DropOne(ctx context.Context, name string, opts ...*op _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for DropOne") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, ...*options.DropSearchIndexOptions) error); ok { r0 = rf(ctx, name, opts...) @@ -233,6 +245,10 @@ func (_m *SearchIndexView) List(ctx context.Context, searchIdxOpts *options.Sear _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for List") + } + var r0 mongoifc.Cursor var r1 error if rf, ok := ret.Get(0).(func(context.Context, *options.SearchIndexesOptions, ...*options.ListSearchIndexesOptions) (mongoifc.Cursor, error)); ok { @@ -303,6 +319,10 @@ func (_m *SearchIndexView) UpdateOne(ctx context.Context, name string, definitio _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for UpdateOne") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, interface{}, ...*options.UpdateSearchIndexOptions) error); ok { r0 = rf(ctx, name, definition, opts...) diff --git a/mocks/mockery/session.go b/mocks/mockery/session.go index f3af85d..80693a5 100644 --- a/mocks/mockery/session.go +++ b/mocks/mockery/session.go @@ -33,6 +33,10 @@ func (_m *Session) EXPECT() *Session_Expecter { func (_m *Session) AbortTransaction(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for AbortTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -75,6 +79,10 @@ func (_c *Session_AbortTransaction_Call) RunAndReturn(run func(context.Context) func (_m *Session) AdvanceClusterTime(_a0 bson.Raw) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AdvanceClusterTime") + } + var r0 error if rf, ok := ret.Get(0).(func(bson.Raw) error); ok { r0 = rf(_a0) @@ -117,6 +125,10 @@ func (_c *Session_AdvanceClusterTime_Call) RunAndReturn(run func(bson.Raw) error func (_m *Session) AdvanceOperationTime(_a0 *primitive.Timestamp) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AdvanceOperationTime") + } + var r0 error if rf, ok := ret.Get(0).(func(*primitive.Timestamp) error); ok { r0 = rf(_a0) @@ -159,6 +171,10 @@ func (_c *Session_AdvanceOperationTime_Call) RunAndReturn(run func(*primitive.Ti func (_m *Session) Client() mongoifc.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Client") + } + var r0 mongoifc.Client if rf, ok := ret.Get(0).(func() mongoifc.Client); ok { r0 = rf() @@ -202,6 +218,10 @@ func (_c *Session_Client_Call) RunAndReturn(run func() mongoifc.Client) *Session func (_m *Session) ClusterTime() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ClusterTime") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -245,6 +265,10 @@ func (_c *Session_ClusterTime_Call) RunAndReturn(run func() bson.Raw) *Session_C func (_m *Session) CommitTransaction(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CommitTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -320,6 +344,10 @@ func (_c *Session_EndSession_Call) RunAndReturn(run func(context.Context)) *Sess func (_m *Session) ID() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -363,6 +391,10 @@ func (_c *Session_ID_Call) RunAndReturn(run func() bson.Raw) *Session_ID_Call { func (_m *Session) OperationTime() *primitive.Timestamp { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OperationTime") + } + var r0 *primitive.Timestamp if rf, ok := ret.Get(0).(func() *primitive.Timestamp); ok { r0 = rf() @@ -412,6 +444,10 @@ func (_m *Session) StartTransaction(opts ...*options.TransactionOptions) error { _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(...*options.TransactionOptions) error); ok { r0 = rf(opts...) @@ -468,6 +504,10 @@ func (_m *Session) WithTransaction(ctx context.Context, fn func(mongoifc.Session _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WithTransaction") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, func(mongoifc.SessionContext) (interface{}, error), ...*options.TransactionOptions) (interface{}, error)); ok { diff --git a/mocks/mockery/session_context.go b/mocks/mockery/session_context.go index d208d96..10199d7 100644 --- a/mocks/mockery/session_context.go +++ b/mocks/mockery/session_context.go @@ -35,6 +35,10 @@ func (_m *SessionContext) EXPECT() *SessionContext_Expecter { func (_m *SessionContext) AbortTransaction(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for AbortTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -77,6 +81,10 @@ func (_c *SessionContext_AbortTransaction_Call) RunAndReturn(run func(context.Co func (_m *SessionContext) AdvanceClusterTime(_a0 bson.Raw) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AdvanceClusterTime") + } + var r0 error if rf, ok := ret.Get(0).(func(bson.Raw) error); ok { r0 = rf(_a0) @@ -119,6 +127,10 @@ func (_c *SessionContext_AdvanceClusterTime_Call) RunAndReturn(run func(bson.Raw func (_m *SessionContext) AdvanceOperationTime(_a0 *primitive.Timestamp) error { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for AdvanceOperationTime") + } + var r0 error if rf, ok := ret.Get(0).(func(*primitive.Timestamp) error); ok { r0 = rf(_a0) @@ -161,6 +173,10 @@ func (_c *SessionContext_AdvanceOperationTime_Call) RunAndReturn(run func(*primi func (_m *SessionContext) Client() mongoifc.Client { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Client") + } + var r0 mongoifc.Client if rf, ok := ret.Get(0).(func() mongoifc.Client); ok { r0 = rf() @@ -204,6 +220,10 @@ func (_c *SessionContext_Client_Call) RunAndReturn(run func() mongoifc.Client) * func (_m *SessionContext) ClusterTime() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ClusterTime") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -247,6 +267,10 @@ func (_c *SessionContext_ClusterTime_Call) RunAndReturn(run func() bson.Raw) *Se func (_m *SessionContext) CommitTransaction(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CommitTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -289,6 +313,10 @@ func (_c *SessionContext_CommitTransaction_Call) RunAndReturn(run func(context.C func (_m *SessionContext) Deadline() (time.Time, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Deadline") + } + var r0 time.Time var r1 bool if rf, ok := ret.Get(0).(func() (time.Time, bool)); ok { @@ -340,6 +368,10 @@ func (_c *SessionContext_Deadline_Call) RunAndReturn(run func() (time.Time, bool func (_m *SessionContext) Done() <-chan struct{} { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Done") + } + var r0 <-chan struct{} if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { r0 = rf() @@ -416,6 +448,10 @@ func (_c *SessionContext_EndSession_Call) RunAndReturn(run func(context.Context) func (_m *SessionContext) Err() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -457,6 +493,10 @@ func (_c *SessionContext_Err_Call) RunAndReturn(run func() error) *SessionContex func (_m *SessionContext) ID() bson.Raw { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 bson.Raw if rf, ok := ret.Get(0).(func() bson.Raw); ok { r0 = rf() @@ -500,6 +540,10 @@ func (_c *SessionContext_ID_Call) RunAndReturn(run func() bson.Raw) *SessionCont func (_m *SessionContext) OperationTime() *primitive.Timestamp { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for OperationTime") + } + var r0 *primitive.Timestamp if rf, ok := ret.Get(0).(func() *primitive.Timestamp); ok { r0 = rf() @@ -549,6 +593,10 @@ func (_m *SessionContext) StartTransaction(opts ...*options.TransactionOptions) _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for StartTransaction") + } + var r0 error if rf, ok := ret.Get(0).(func(...*options.TransactionOptions) error); ok { r0 = rf(opts...) @@ -598,6 +646,10 @@ func (_c *SessionContext_StartTransaction_Call) RunAndReturn(run func(...*option func (_m *SessionContext) Value(key interface{}) interface{} { ret := _m.Called(key) + if len(ret) == 0 { + panic("no return value specified for Value") + } + var r0 interface{} if rf, ok := ret.Get(0).(func(interface{}) interface{}); ok { r0 = rf(key) @@ -649,6 +701,10 @@ func (_m *SessionContext) WithTransaction(ctx context.Context, fn func(mongoifc. _ca = append(_ca, _va...) ret := _m.Called(_ca...) + if len(ret) == 0 { + panic("no return value specified for WithTransaction") + } + var r0 interface{} var r1 error if rf, ok := ret.Get(0).(func(context.Context, func(mongoifc.SessionContext) (interface{}, error), ...*options.TransactionOptions) (interface{}, error)); ok { diff --git a/mocks/mockery/single_result.go b/mocks/mockery/single_result.go index 57b3488..ea33429 100644 --- a/mocks/mockery/single_result.go +++ b/mocks/mockery/single_result.go @@ -24,6 +24,10 @@ func (_m *SingleResult) EXPECT() *SingleResult_Expecter { func (_m *SingleResult) Decode(v interface{}) error { ret := _m.Called(v) + if len(ret) == 0 { + panic("no return value specified for Decode") + } + var r0 error if rf, ok := ret.Get(0).(func(interface{}) error); ok { r0 = rf(v) @@ -66,6 +70,10 @@ func (_c *SingleResult_Decode_Call) RunAndReturn(run func(interface{}) error) *S func (_m *SingleResult) DecodeBytes() (bson.Raw, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DecodeBytes") + } + var r0 bson.Raw var r1 error if rf, ok := ret.Get(0).(func() (bson.Raw, error)); ok { @@ -119,6 +127,10 @@ func (_c *SingleResult_DecodeBytes_Call) RunAndReturn(run func() (bson.Raw, erro func (_m *SingleResult) Err() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Err") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -160,6 +172,10 @@ func (_c *SingleResult_Err_Call) RunAndReturn(run func() error) *SingleResult_Er func (_m *SingleResult) Raw() (bson.Raw, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Raw") + } + var r0 bson.Raw var r1 error if rf, ok := ret.Get(0).(func() (bson.Raw, error)); ok {