diff --git a/client/mocks/collection.go b/client/mocks/collection.go index 9e1cf9b654..3b80849661 100644 --- a/client/mocks/collection.go +++ b/client/mocks/collection.go @@ -29,6 +29,10 @@ func (_m *Collection) EXPECT() *Collection_Expecter { func (_m *Collection) Create(ctx context.Context, doc *client.Document) error { ret := _m.Called(ctx, doc) + if len(ret) == 0 { + panic("no return value specified for Create") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *client.Document) error); ok { r0 = rf(ctx, doc) @@ -72,6 +76,10 @@ func (_c *Collection_Create_Call) RunAndReturn(run func(context.Context, *client func (_m *Collection) CreateIndex(_a0 context.Context, _a1 client.IndexDescription) (client.IndexDescription, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for CreateIndex") + } + var r0 client.IndexDescription var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.IndexDescription) (client.IndexDescription, error)); ok { @@ -125,6 +133,10 @@ func (_c *Collection_CreateIndex_Call) RunAndReturn(run func(context.Context, cl func (_m *Collection) CreateMany(ctx context.Context, docs []*client.Document) error { ret := _m.Called(ctx, docs) + if len(ret) == 0 { + panic("no return value specified for CreateMany") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []*client.Document) error); ok { r0 = rf(ctx, docs) @@ -168,6 +180,10 @@ func (_c *Collection_CreateMany_Call) RunAndReturn(run func(context.Context, []* func (_m *Collection) Definition() client.CollectionDefinition { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Definition") + } + var r0 client.CollectionDefinition if rf, ok := ret.Get(0).(func() client.CollectionDefinition); ok { r0 = rf() @@ -209,6 +225,10 @@ func (_c *Collection_Definition_Call) RunAndReturn(run func() client.CollectionD func (_m *Collection) Delete(ctx context.Context, docID client.DocID) (bool, error) { ret := _m.Called(ctx, docID) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.DocID) (bool, error)); ok { @@ -262,6 +282,10 @@ func (_c *Collection_Delete_Call) RunAndReturn(run func(context.Context, client. func (_m *Collection) DeleteWithFilter(ctx context.Context, filter interface{}) (*client.DeleteResult, error) { ret := _m.Called(ctx, filter) + if len(ret) == 0 { + panic("no return value specified for DeleteWithFilter") + } + var r0 *client.DeleteResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}) (*client.DeleteResult, error)); ok { @@ -317,6 +341,10 @@ func (_c *Collection_DeleteWithFilter_Call) RunAndReturn(run func(context.Contex func (_m *Collection) Description() client.CollectionDescription { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Description") + } + var r0 client.CollectionDescription if rf, ok := ret.Get(0).(func() client.CollectionDescription); ok { r0 = rf() @@ -358,6 +386,10 @@ func (_c *Collection_Description_Call) RunAndReturn(run func() client.Collection func (_m *Collection) DropIndex(ctx context.Context, indexName string) error { ret := _m.Called(ctx, indexName) + if len(ret) == 0 { + panic("no return value specified for DropIndex") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, indexName) @@ -401,6 +433,10 @@ func (_c *Collection_DropIndex_Call) RunAndReturn(run func(context.Context, stri func (_m *Collection) Exists(ctx context.Context, docID client.DocID) (bool, error) { ret := _m.Called(ctx, docID) + if len(ret) == 0 { + panic("no return value specified for Exists") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.DocID) (bool, error)); ok { @@ -454,6 +490,10 @@ func (_c *Collection_Exists_Call) RunAndReturn(run func(context.Context, client. func (_m *Collection) Get(ctx context.Context, docID client.DocID, showDeleted bool) (*client.Document, error) { ret := _m.Called(ctx, docID, showDeleted) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 *client.Document var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.DocID, bool) (*client.Document, error)); ok { @@ -510,6 +550,10 @@ func (_c *Collection_Get_Call) RunAndReturn(run func(context.Context, client.Doc func (_m *Collection) GetAllDocIDs(ctx context.Context) (<-chan client.DocIDResult, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetAllDocIDs") + } + var r0 <-chan client.DocIDResult var r1 error if rf, ok := ret.Get(0).(func(context.Context) (<-chan client.DocIDResult, error)); ok { @@ -564,6 +608,10 @@ func (_c *Collection_GetAllDocIDs_Call) RunAndReturn(run func(context.Context) ( func (_m *Collection) GetIndexes(ctx context.Context) ([]client.IndexDescription, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetIndexes") + } + var r0 []client.IndexDescription var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]client.IndexDescription, error)); ok { @@ -618,6 +666,10 @@ func (_c *Collection_GetIndexes_Call) RunAndReturn(run func(context.Context) ([] func (_m *Collection) ID() uint32 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 uint32 if rf, ok := ret.Get(0).(func() uint32); ok { r0 = rf() @@ -659,6 +711,10 @@ func (_c *Collection_ID_Call) RunAndReturn(run func() uint32) *Collection_ID_Cal func (_m *Collection) Name() immutable.Option[string] { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Name") + } + var r0 immutable.Option[string] if rf, ok := ret.Get(0).(func() immutable.Option[string]); ok { r0 = rf() @@ -700,6 +756,10 @@ func (_c *Collection_Name_Call) RunAndReturn(run func() immutable.Option[string] func (_m *Collection) Save(ctx context.Context, doc *client.Document) error { ret := _m.Called(ctx, doc) + if len(ret) == 0 { + panic("no return value specified for Save") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *client.Document) error); ok { r0 = rf(ctx, doc) @@ -743,6 +803,10 @@ func (_c *Collection_Save_Call) RunAndReturn(run func(context.Context, *client.D func (_m *Collection) Schema() client.SchemaDescription { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Schema") + } + var r0 client.SchemaDescription if rf, ok := ret.Get(0).(func() client.SchemaDescription); ok { r0 = rf() @@ -784,6 +848,10 @@ func (_c *Collection_Schema_Call) RunAndReturn(run func() client.SchemaDescripti func (_m *Collection) SchemaRoot() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchemaRoot") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -825,6 +893,10 @@ func (_c *Collection_SchemaRoot_Call) RunAndReturn(run func() string) *Collectio func (_m *Collection) Update(ctx context.Context, docs *client.Document) error { ret := _m.Called(ctx, docs) + if len(ret) == 0 { + panic("no return value specified for Update") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *client.Document) error); ok { r0 = rf(ctx, docs) @@ -868,6 +940,10 @@ func (_c *Collection_Update_Call) RunAndReturn(run func(context.Context, *client func (_m *Collection) UpdateWithFilter(ctx context.Context, filter interface{}, updater string) (*client.UpdateResult, error) { ret := _m.Called(ctx, filter, updater) + if len(ret) == 0 { + panic("no return value specified for UpdateWithFilter") + } + var r0 *client.UpdateResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, interface{}, string) (*client.UpdateResult, error)); ok { diff --git a/client/mocks/db.go b/client/mocks/db.go index c56af31167..396bc5397c 100644 --- a/client/mocks/db.go +++ b/client/mocks/db.go @@ -37,6 +37,10 @@ func (_m *DB) EXPECT() *DB_Expecter { func (_m *DB) AddPolicy(ctx context.Context, policy string) (client.AddPolicyResult, error) { ret := _m.Called(ctx, policy) + if len(ret) == 0 { + panic("no return value specified for AddPolicy") + } + var r0 client.AddPolicyResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (client.AddPolicyResult, error)); ok { @@ -90,6 +94,10 @@ func (_c *DB_AddPolicy_Call) RunAndReturn(run func(context.Context, string) (cli func (_m *DB) AddSchema(_a0 context.Context, _a1 string) ([]client.CollectionDescription, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for AddSchema") + } + var r0 []client.CollectionDescription var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) ([]client.CollectionDescription, error)); ok { @@ -145,6 +153,10 @@ func (_c *DB_AddSchema_Call) RunAndReturn(run func(context.Context, string) ([]c func (_m *DB) AddView(ctx context.Context, gqlQuery string, sdl string, transform immutable.Option[model.Lens]) ([]client.CollectionDefinition, error) { ret := _m.Called(ctx, gqlQuery, sdl, transform) + if len(ret) == 0 { + panic("no return value specified for AddView") + } + var r0 []client.CollectionDefinition var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string, immutable.Option[model.Lens]) ([]client.CollectionDefinition, error)); ok { @@ -202,6 +214,10 @@ func (_c *DB_AddView_Call) RunAndReturn(run func(context.Context, string, string func (_m *DB) BasicExport(ctx context.Context, config *client.BackupConfig) error { ret := _m.Called(ctx, config) + if len(ret) == 0 { + panic("no return value specified for BasicExport") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *client.BackupConfig) error); ok { r0 = rf(ctx, config) @@ -245,6 +261,10 @@ func (_c *DB_BasicExport_Call) RunAndReturn(run func(context.Context, *client.Ba func (_m *DB) BasicImport(ctx context.Context, filepath string) error { ret := _m.Called(ctx, filepath) + if len(ret) == 0 { + panic("no return value specified for BasicImport") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(ctx, filepath) @@ -288,6 +308,10 @@ func (_c *DB_BasicImport_Call) RunAndReturn(run func(context.Context, string) er func (_m *DB) Blockstore() datastore.DAGStore { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Blockstore") + } + var r0 datastore.DAGStore if rf, ok := ret.Get(0).(func() datastore.DAGStore); ok { r0 = rf() @@ -363,6 +387,10 @@ func (_c *DB_Close_Call) RunAndReturn(run func()) *DB_Close_Call { func (_m *DB) Events() *event.Bus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Events") + } + var r0 *event.Bus if rf, ok := ret.Get(0).(func() *event.Bus); ok { r0 = rf() @@ -406,6 +434,10 @@ func (_c *DB_Events_Call) RunAndReturn(run func() *event.Bus) *DB_Events_Call { func (_m *DB) ExecRequest(ctx context.Context, request string) *client.RequestResult { ret := _m.Called(ctx, request) + if len(ret) == 0 { + panic("no return value specified for ExecRequest") + } + var r0 *client.RequestResult if rf, ok := ret.Get(0).(func(context.Context, string) *client.RequestResult); ok { r0 = rf(ctx, request) @@ -451,6 +483,10 @@ func (_c *DB_ExecRequest_Call) RunAndReturn(run func(context.Context, string) *c func (_m *DB) GetAllIndexes(_a0 context.Context) (map[string][]client.IndexDescription, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetAllIndexes") + } + var r0 map[string][]client.IndexDescription var r1 error if rf, ok := ret.Get(0).(func(context.Context) (map[string][]client.IndexDescription, error)); ok { @@ -505,6 +541,10 @@ func (_c *DB_GetAllIndexes_Call) RunAndReturn(run func(context.Context) (map[str func (_m *DB) GetCollectionByName(_a0 context.Context, _a1 string) (client.Collection, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCollectionByName") + } + var r0 client.Collection var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (client.Collection, error)); ok { @@ -560,6 +600,10 @@ func (_c *DB_GetCollectionByName_Call) RunAndReturn(run func(context.Context, st func (_m *DB) GetCollections(_a0 context.Context, _a1 client.CollectionFetchOptions) ([]client.Collection, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetCollections") + } + var r0 []client.Collection var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.CollectionFetchOptions) ([]client.Collection, error)); ok { @@ -615,6 +659,10 @@ func (_c *DB_GetCollections_Call) RunAndReturn(run func(context.Context, client. func (_m *DB) GetSchemaByVersionID(_a0 context.Context, _a1 string) (client.SchemaDescription, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetSchemaByVersionID") + } + var r0 client.SchemaDescription var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (client.SchemaDescription, error)); ok { @@ -668,6 +716,10 @@ func (_c *DB_GetSchemaByVersionID_Call) RunAndReturn(run func(context.Context, s func (_m *DB) GetSchemas(_a0 context.Context, _a1 client.SchemaFetchOptions) ([]client.SchemaDescription, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetSchemas") + } + var r0 []client.SchemaDescription var r1 error if rf, ok := ret.Get(0).(func(context.Context, client.SchemaFetchOptions) ([]client.SchemaDescription, error)); ok { @@ -723,6 +775,10 @@ func (_c *DB_GetSchemas_Call) RunAndReturn(run func(context.Context, client.Sche func (_m *DB) Headstore() go_datastore.Read { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Headstore") + } + var r0 go_datastore.Read if rf, ok := ret.Get(0).(func() go_datastore.Read); ok { r0 = rf() @@ -766,6 +822,10 @@ func (_c *DB_Headstore_Call) RunAndReturn(run func() go_datastore.Read) *DB_Head func (_m *DB) LensRegistry() client.LensRegistry { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for LensRegistry") + } + var r0 client.LensRegistry if rf, ok := ret.Get(0).(func() client.LensRegistry); ok { r0 = rf() @@ -809,6 +869,10 @@ func (_c *DB_LensRegistry_Call) RunAndReturn(run func() client.LensRegistry) *DB func (_m *DB) MaxTxnRetries() int { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for MaxTxnRetries") + } + var r0 int if rf, ok := ret.Get(0).(func() int); ok { r0 = rf() @@ -850,6 +914,10 @@ func (_c *DB_MaxTxnRetries_Call) RunAndReturn(run func() int) *DB_MaxTxnRetries_ func (_m *DB) NewConcurrentTxn(_a0 context.Context, _a1 bool) (datastore.Txn, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for NewConcurrentTxn") + } + var r0 datastore.Txn var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (datastore.Txn, error)); ok { @@ -905,6 +973,10 @@ func (_c *DB_NewConcurrentTxn_Call) RunAndReturn(run func(context.Context, bool) func (_m *DB) NewTxn(_a0 context.Context, _a1 bool) (datastore.Txn, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for NewTxn") + } + var r0 datastore.Txn var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (datastore.Txn, error)); ok { @@ -960,6 +1032,10 @@ func (_c *DB_NewTxn_Call) RunAndReturn(run func(context.Context, bool) (datastor func (_m *DB) PatchCollection(_a0 context.Context, _a1 string) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PatchCollection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(_a0, _a1) @@ -1003,6 +1079,10 @@ func (_c *DB_PatchCollection_Call) RunAndReturn(run func(context.Context, string func (_m *DB) PatchSchema(_a0 context.Context, _a1 string, _a2 immutable.Option[model.Lens], _a3 bool) error { ret := _m.Called(_a0, _a1, _a2, _a3) + if len(ret) == 0 { + panic("no return value specified for PatchSchema") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string, immutable.Option[model.Lens], bool) error); ok { r0 = rf(_a0, _a1, _a2, _a3) @@ -1048,6 +1128,10 @@ func (_c *DB_PatchSchema_Call) RunAndReturn(run func(context.Context, string, im func (_m *DB) Peerstore() datastore.DSBatching { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Peerstore") + } + var r0 datastore.DSBatching if rf, ok := ret.Get(0).(func() datastore.DSBatching); ok { r0 = rf() @@ -1091,6 +1175,10 @@ func (_c *DB_Peerstore_Call) RunAndReturn(run func() datastore.DSBatching) *DB_P func (_m *DB) PrintDump(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for PrintDump") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -1133,6 +1221,10 @@ func (_c *DB_PrintDump_Call) RunAndReturn(run func(context.Context) error) *DB_P func (_m *DB) Root() datastore.RootStore { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Root") + } + var r0 datastore.RootStore if rf, ok := ret.Get(0).(func() datastore.RootStore); ok { r0 = rf() @@ -1176,6 +1268,10 @@ func (_c *DB_Root_Call) RunAndReturn(run func() datastore.RootStore) *DB_Root_Ca func (_m *DB) SetActiveSchemaVersion(_a0 context.Context, _a1 string) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SetActiveSchemaVersion") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = rf(_a0, _a1) @@ -1219,6 +1315,10 @@ func (_c *DB_SetActiveSchemaVersion_Call) RunAndReturn(run func(context.Context, func (_m *DB) SetMigration(_a0 context.Context, _a1 client.LensConfig) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for SetMigration") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, client.LensConfig) error); ok { r0 = rf(_a0, _a1) diff --git a/datastore/mocks/dag_store.go b/datastore/mocks/dag_store.go index a9ba9e2af8..f6fe123a80 100644 --- a/datastore/mocks/dag_store.go +++ b/datastore/mocks/dag_store.go @@ -30,6 +30,10 @@ func (_m *DAGStore) EXPECT() *DAGStore_Expecter { func (_m *DAGStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for AllKeysChan") + } + var r0 <-chan cid.Cid var r1 error if rf, ok := ret.Get(0).(func(context.Context) (<-chan cid.Cid, error)); ok { @@ -84,6 +88,10 @@ func (_c *DAGStore_AllKeysChan_Call) RunAndReturn(run func(context.Context) (<-c func (_m *DAGStore) AsIPLDStorage() datastore.IPLDStorage { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for AsIPLDStorage") + } + var r0 datastore.IPLDStorage if rf, ok := ret.Get(0).(func() datastore.IPLDStorage); ok { r0 = rf() @@ -127,6 +135,10 @@ func (_c *DAGStore_AsIPLDStorage_Call) RunAndReturn(run func() datastore.IPLDSto func (_m *DAGStore) DeleteBlock(_a0 context.Context, _a1 cid.Cid) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DeleteBlock") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) error); ok { r0 = rf(_a0, _a1) @@ -170,6 +182,10 @@ func (_c *DAGStore_DeleteBlock_Call) RunAndReturn(run func(context.Context, cid. func (_m *DAGStore) Get(_a0 context.Context, _a1 cid.Cid) (blocks.Block, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 blocks.Block var r1 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) (blocks.Block, error)); ok { @@ -225,6 +241,10 @@ func (_c *DAGStore_Get_Call) RunAndReturn(run func(context.Context, cid.Cid) (bl func (_m *DAGStore) GetSize(_a0 context.Context, _a1 cid.Cid) (int, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetSize") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) (int, error)); ok { @@ -278,6 +298,10 @@ func (_c *DAGStore_GetSize_Call) RunAndReturn(run func(context.Context, cid.Cid) func (_m *DAGStore) Has(_a0 context.Context, _a1 cid.Cid) (bool, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, cid.Cid) (bool, error)); ok { @@ -364,6 +388,10 @@ func (_c *DAGStore_HashOnRead_Call) RunAndReturn(run func(bool)) *DAGStore_HashO func (_m *DAGStore) Put(_a0 context.Context, _a1 blocks.Block) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Put") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, blocks.Block) error); ok { r0 = rf(_a0, _a1) @@ -407,6 +435,10 @@ func (_c *DAGStore_Put_Call) RunAndReturn(run func(context.Context, blocks.Block func (_m *DAGStore) PutMany(_a0 context.Context, _a1 []blocks.Block) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for PutMany") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, []blocks.Block) error); ok { r0 = rf(_a0, _a1) diff --git a/datastore/mocks/ds_reader_writer.go b/datastore/mocks/ds_reader_writer.go index 865086c697..989521521e 100644 --- a/datastore/mocks/ds_reader_writer.go +++ b/datastore/mocks/ds_reader_writer.go @@ -31,6 +31,10 @@ func (_m *DSReaderWriter) EXPECT() *DSReaderWriter_Expecter { func (_m *DSReaderWriter) Delete(ctx context.Context, key datastore.Key) error { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) error); ok { r0 = rf(ctx, key) @@ -74,6 +78,10 @@ func (_c *DSReaderWriter_Delete_Call) RunAndReturn(run func(context.Context, dat func (_m *DSReaderWriter) Get(ctx context.Context, key datastore.Key) ([]byte, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) ([]byte, error)); ok { @@ -129,6 +137,10 @@ func (_c *DSReaderWriter_Get_Call) RunAndReturn(run func(context.Context, datast func (_m *DSReaderWriter) GetIterator(q query.Query) (iterable.Iterator, error) { ret := _m.Called(q) + if len(ret) == 0 { + panic("no return value specified for GetIterator") + } + var r0 iterable.Iterator var r1 error if rf, ok := ret.Get(0).(func(query.Query) (iterable.Iterator, error)); ok { @@ -183,6 +195,10 @@ func (_c *DSReaderWriter_GetIterator_Call) RunAndReturn(run func(query.Query) (i func (_m *DSReaderWriter) GetSize(ctx context.Context, key datastore.Key) (int, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for GetSize") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) (int, error)); ok { @@ -236,6 +252,10 @@ func (_c *DSReaderWriter_GetSize_Call) RunAndReturn(run func(context.Context, da func (_m *DSReaderWriter) Has(ctx context.Context, key datastore.Key) (bool, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) (bool, error)); ok { @@ -289,6 +309,10 @@ func (_c *DSReaderWriter_Has_Call) RunAndReturn(run func(context.Context, datast func (_m *DSReaderWriter) Put(ctx context.Context, key datastore.Key, value []byte) error { ret := _m.Called(ctx, key, value) + if len(ret) == 0 { + panic("no return value specified for Put") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key, []byte) error); ok { r0 = rf(ctx, key, value) @@ -333,6 +357,10 @@ func (_c *DSReaderWriter_Put_Call) RunAndReturn(run func(context.Context, datast func (_m *DSReaderWriter) Query(ctx context.Context, q query.Query) (query.Results, error) { ret := _m.Called(ctx, q) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 query.Results var r1 error if rf, ok := ret.Get(0).(func(context.Context, query.Query) (query.Results, error)); ok { diff --git a/datastore/mocks/results.go b/datastore/mocks/results.go index e1fee8f859..d1f68949a7 100644 --- a/datastore/mocks/results.go +++ b/datastore/mocks/results.go @@ -26,6 +26,10 @@ func (_m *Results) EXPECT() *Results_Expecter { func (_m *Results) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -67,6 +71,10 @@ func (_c *Results_Close_Call) RunAndReturn(run func() error) *Results_Close_Call func (_m *Results) Next() <-chan query.Result { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Next") + } + var r0 <-chan query.Result if rf, ok := ret.Get(0).(func() <-chan query.Result); ok { r0 = rf() @@ -110,6 +118,10 @@ func (_c *Results_Next_Call) RunAndReturn(run func() <-chan query.Result) *Resul func (_m *Results) NextSync() (query.Result, bool) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for NextSync") + } + var r0 query.Result var r1 bool if rf, ok := ret.Get(0).(func() (query.Result, bool)); ok { @@ -161,6 +173,10 @@ func (_c *Results_NextSync_Call) RunAndReturn(run func() (query.Result, bool)) * func (_m *Results) Process() goprocess.Process { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Process") + } + var r0 goprocess.Process if rf, ok := ret.Get(0).(func() goprocess.Process); ok { r0 = rf() @@ -204,6 +220,10 @@ func (_c *Results_Process_Call) RunAndReturn(run func() goprocess.Process) *Resu func (_m *Results) Query() query.Query { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 query.Query if rf, ok := ret.Get(0).(func() query.Query); ok { r0 = rf() @@ -245,6 +265,10 @@ func (_c *Results_Query_Call) RunAndReturn(run func() query.Query) *Results_Quer func (_m *Results) Rest() ([]query.Entry, error) { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Rest") + } + var r0 []query.Entry var r1 error if rf, ok := ret.Get(0).(func() ([]query.Entry, error)); ok { diff --git a/datastore/mocks/root_store.go b/datastore/mocks/root_store.go index 836a059f68..94d2694721 100644 --- a/datastore/mocks/root_store.go +++ b/datastore/mocks/root_store.go @@ -29,6 +29,10 @@ func (_m *RootStore) EXPECT() *RootStore_Expecter { func (_m *RootStore) Batch(ctx context.Context) (datastore.Batch, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Batch") + } + var r0 datastore.Batch var r1 error if rf, ok := ret.Get(0).(func(context.Context) (datastore.Batch, error)); ok { @@ -83,6 +87,10 @@ func (_c *RootStore_Batch_Call) RunAndReturn(run func(context.Context) (datastor func (_m *RootStore) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -124,6 +132,10 @@ func (_c *RootStore_Close_Call) RunAndReturn(run func() error) *RootStore_Close_ func (_m *RootStore) Delete(ctx context.Context, key datastore.Key) error { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) error); ok { r0 = rf(ctx, key) @@ -167,6 +179,10 @@ func (_c *RootStore_Delete_Call) RunAndReturn(run func(context.Context, datastor func (_m *RootStore) Get(ctx context.Context, key datastore.Key) ([]byte, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 []byte var r1 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) ([]byte, error)); ok { @@ -222,6 +238,10 @@ func (_c *RootStore_Get_Call) RunAndReturn(run func(context.Context, datastore.K func (_m *RootStore) GetSize(ctx context.Context, key datastore.Key) (int, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for GetSize") + } + var r0 int var r1 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) (int, error)); ok { @@ -275,6 +295,10 @@ func (_c *RootStore_GetSize_Call) RunAndReturn(run func(context.Context, datasto func (_m *RootStore) Has(ctx context.Context, key datastore.Key) (bool, error) { ret := _m.Called(ctx, key) + if len(ret) == 0 { + panic("no return value specified for Has") + } + var r0 bool var r1 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) (bool, error)); ok { @@ -328,6 +352,10 @@ func (_c *RootStore_Has_Call) RunAndReturn(run func(context.Context, datastore.K func (_m *RootStore) NewTransaction(ctx context.Context, readOnly bool) (datastore.Txn, error) { ret := _m.Called(ctx, readOnly) + if len(ret) == 0 { + panic("no return value specified for NewTransaction") + } + var r0 datastore.Txn var r1 error if rf, ok := ret.Get(0).(func(context.Context, bool) (datastore.Txn, error)); ok { @@ -383,6 +411,10 @@ func (_c *RootStore_NewTransaction_Call) RunAndReturn(run func(context.Context, func (_m *RootStore) Put(ctx context.Context, key datastore.Key, value []byte) error { ret := _m.Called(ctx, key, value) + if len(ret) == 0 { + panic("no return value specified for Put") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key, []byte) error); ok { r0 = rf(ctx, key, value) @@ -427,6 +459,10 @@ func (_c *RootStore_Put_Call) RunAndReturn(run func(context.Context, datastore.K func (_m *RootStore) Query(ctx context.Context, q query.Query) (query.Results, error) { ret := _m.Called(ctx, q) + if len(ret) == 0 { + panic("no return value specified for Query") + } + var r0 query.Results var r1 error if rf, ok := ret.Get(0).(func(context.Context, query.Query) (query.Results, error)); ok { @@ -482,6 +518,10 @@ func (_c *RootStore_Query_Call) RunAndReturn(run func(context.Context, query.Que func (_m *RootStore) Sync(ctx context.Context, prefix datastore.Key) error { ret := _m.Called(ctx, prefix) + if len(ret) == 0 { + panic("no return value specified for Sync") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, datastore.Key) error); ok { r0 = rf(ctx, prefix) diff --git a/datastore/mocks/txn.go b/datastore/mocks/txn.go index 711464dc12..7c9872dfb2 100644 --- a/datastore/mocks/txn.go +++ b/datastore/mocks/txn.go @@ -26,6 +26,10 @@ func (_m *Txn) EXPECT() *Txn_Expecter { func (_m *Txn) Commit(ctx context.Context) error { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for Commit") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context) error); ok { r0 = rf(ctx) @@ -68,6 +72,10 @@ func (_c *Txn_Commit_Call) RunAndReturn(run func(context.Context) error) *Txn_Co func (_m *Txn) DAGstore() datastore.DAGStore { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for DAGstore") + } + var r0 datastore.DAGStore if rf, ok := ret.Get(0).(func() datastore.DAGStore); ok { r0 = rf() @@ -111,6 +119,10 @@ func (_c *Txn_DAGstore_Call) RunAndReturn(run func() datastore.DAGStore) *Txn_DA func (_m *Txn) Datastore() datastore.DSReaderWriter { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Datastore") + } + var r0 datastore.DSReaderWriter if rf, ok := ret.Get(0).(func() datastore.DSReaderWriter); ok { r0 = rf() @@ -187,6 +199,10 @@ func (_c *Txn_Discard_Call) RunAndReturn(run func(context.Context)) *Txn_Discard func (_m *Txn) Headstore() datastore.DSReaderWriter { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Headstore") + } + var r0 datastore.DSReaderWriter if rf, ok := ret.Get(0).(func() datastore.DSReaderWriter); ok { r0 = rf() @@ -230,6 +246,10 @@ func (_c *Txn_Headstore_Call) RunAndReturn(run func() datastore.DSReaderWriter) func (_m *Txn) ID() uint64 { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 uint64 if rf, ok := ret.Get(0).(func() uint64); ok { r0 = rf() @@ -469,6 +489,10 @@ func (_c *Txn_OnSuccessAsync_Call) RunAndReturn(run func(func())) *Txn_OnSuccess func (_m *Txn) Peerstore() datastore.DSBatching { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Peerstore") + } + var r0 datastore.DSBatching if rf, ok := ret.Get(0).(func() datastore.DSBatching); ok { r0 = rf() @@ -512,6 +536,10 @@ func (_c *Txn_Peerstore_Call) RunAndReturn(run func() datastore.DSBatching) *Txn func (_m *Txn) Rootstore() datastore.DSReaderWriter { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Rootstore") + } + var r0 datastore.DSReaderWriter if rf, ok := ret.Get(0).(func() datastore.DSReaderWriter); ok { r0 = rf() @@ -555,6 +583,10 @@ func (_c *Txn_Rootstore_Call) RunAndReturn(run func() datastore.DSReaderWriter) func (_m *Txn) Systemstore() datastore.DSReaderWriter { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Systemstore") + } + var r0 datastore.DSReaderWriter if rf, ok := ret.Get(0).(func() datastore.DSReaderWriter); ok { r0 = rf() diff --git a/internal/db/fetcher/mocks/encoded_document.go b/internal/db/fetcher/mocks/encoded_document.go index 6a517e19dd..1905908e11 100644 --- a/internal/db/fetcher/mocks/encoded_document.go +++ b/internal/db/fetcher/mocks/encoded_document.go @@ -25,6 +25,10 @@ func (_m *EncodedDocument) EXPECT() *EncodedDocument_Expecter { func (_m *EncodedDocument) ID() []byte { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for ID") + } + var r0 []byte if rf, ok := ret.Get(0).(func() []byte); ok { r0 = rf() @@ -68,6 +72,10 @@ func (_c *EncodedDocument_ID_Call) RunAndReturn(run func() []byte) *EncodedDocum func (_m *EncodedDocument) Properties(onlyFilterProps bool) (map[client.FieldDefinition]interface{}, error) { ret := _m.Called(onlyFilterProps) + if len(ret) == 0 { + panic("no return value specified for Properties") + } + var r0 map[client.FieldDefinition]interface{} var r1 error if rf, ok := ret.Get(0).(func(bool) (map[client.FieldDefinition]interface{}, error)); ok { @@ -154,6 +162,10 @@ func (_c *EncodedDocument_Reset_Call) RunAndReturn(run func()) *EncodedDocument_ func (_m *EncodedDocument) SchemaVersionID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for SchemaVersionID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -195,6 +207,10 @@ func (_c *EncodedDocument_SchemaVersionID_Call) RunAndReturn(run func() string) func (_m *EncodedDocument) Status() client.DocumentStatus { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Status") + } + var r0 client.DocumentStatus if rf, ok := ret.Get(0).(func() client.DocumentStatus); ok { r0 = rf() diff --git a/internal/db/fetcher/mocks/fetcher.go b/internal/db/fetcher/mocks/fetcher.go index b60385d110..2dac3b0079 100644 --- a/internal/db/fetcher/mocks/fetcher.go +++ b/internal/db/fetcher/mocks/fetcher.go @@ -40,6 +40,10 @@ func (_m *Fetcher) EXPECT() *Fetcher_Expecter { func (_m *Fetcher) Close() error { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Close") + } + var r0 error if rf, ok := ret.Get(0).(func() error); ok { r0 = rf() @@ -81,6 +85,10 @@ func (_c *Fetcher_Close_Call) RunAndReturn(run func() error) *Fetcher_Close_Call func (_m *Fetcher) FetchNext(ctx context.Context) (fetcher.EncodedDocument, fetcher.ExecInfo, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for FetchNext") + } + var r0 fetcher.EncodedDocument var r1 fetcher.ExecInfo var r2 error @@ -142,6 +150,10 @@ func (_c *Fetcher_FetchNext_Call) RunAndReturn(run func(context.Context) (fetche func (_m *Fetcher) Init(ctx context.Context, _a1 immutable.Option[identity.Identity], txn datastore.Txn, _a3 immutable.Option[acp.ACP], col client.Collection, fields []client.FieldDefinition, filter *mapper.Filter, docmapper *core.DocumentMapping, reverse bool, showDeleted bool) error { ret := _m.Called(ctx, _a1, txn, _a3, col, fields, filter, docmapper, reverse, showDeleted) + if len(ret) == 0 { + panic("no return value specified for Init") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, immutable.Option[identity.Identity], datastore.Txn, immutable.Option[acp.ACP], client.Collection, []client.FieldDefinition, *mapper.Filter, *core.DocumentMapping, bool, bool) error); ok { r0 = rf(ctx, _a1, txn, _a3, col, fields, filter, docmapper, reverse, showDeleted) @@ -193,6 +205,10 @@ func (_c *Fetcher_Init_Call) RunAndReturn(run func(context.Context, immutable.Op func (_m *Fetcher) Start(ctx context.Context, spans core.Spans) error { ret := _m.Called(ctx, spans) + if len(ret) == 0 { + panic("no return value specified for Start") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, core.Spans) error); ok { r0 = rf(ctx, spans)