1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-10 18:10:49 +09:00

GO-4146 Fix acl service test

This commit is contained in:
mcrakhman 2025-02-05 18:33:31 +01:00
parent e7e790a55e
commit 1f8453a044
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
5 changed files with 157 additions and 269 deletions

View file

@ -143,9 +143,6 @@ func (m mockSyncAcl) HandleRequest(ctx context.Context, senderId string, request
return nil, nil
}
func (m mockSyncAcl) SetHeadUpdater(updater headupdater.HeadUpdater) {
}
func (m mockSyncAcl) SetAclUpdater(updater headupdater.AclUpdater) {
}
@ -326,7 +323,7 @@ func TestService_ViewInvite(t *testing.T) {
keys, err := accountdata.NewRandom()
require.NoError(t, err)
fx.mockAccountService.EXPECT().Keys().Return(keys)
aclList, err := list.NewTestDerivedAcl("spaceId", keys)
aclList, err := list.NewInMemoryDerivedAcl("spaceId", keys)
require.NoError(t, err)
inv, err := aclList.RecordBuilder().BuildInvite()
require.NoError(t, err)
@ -357,7 +354,7 @@ func TestService_ViewInvite(t *testing.T) {
keys, err := accountdata.NewRandom()
require.NoError(t, err)
fx.mockAccountService.EXPECT().Keys().Return(keys)
aclList, err := list.NewTestDerivedAcl("spaceId", keys)
aclList, err := list.NewInMemoryDerivedAcl("spaceId", keys)
require.NoError(t, err)
inv, err := aclList.RecordBuilder().BuildInvite()
require.NoError(t, err)

View file

@ -276,6 +276,39 @@ func (_c *MockStore_Id_Call) RunAndReturn(run func() string) *MockStore_Id_Call
return _c
}
// MarkSeenHeads provides a mock function with given fields: heads
func (_m *MockStore) MarkSeenHeads(heads []string) {
_m.Called(heads)
}
// MockStore_MarkSeenHeads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkSeenHeads'
type MockStore_MarkSeenHeads_Call struct {
*mock.Call
}
// MarkSeenHeads is a helper method to define mock.On call
// - heads []string
func (_e *MockStore_Expecter) MarkSeenHeads(heads interface{}) *MockStore_MarkSeenHeads_Call {
return &MockStore_MarkSeenHeads_Call{Call: _e.mock.On("MarkSeenHeads", heads)}
}
func (_c *MockStore_MarkSeenHeads_Call) Run(run func(heads []string)) *MockStore_MarkSeenHeads_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].([]string))
})
return _c
}
func (_c *MockStore_MarkSeenHeads_Call) Return() *MockStore_MarkSeenHeads_Call {
_c.Call.Return()
return _c
}
func (_c *MockStore_MarkSeenHeads_Call) RunAndReturn(run func([]string)) *MockStore_MarkSeenHeads_Call {
_c.Call.Return(run)
return _c
}
// PushChange provides a mock function with given fields: params
func (_m *MockStore) PushChange(params source.PushChangeParams) (string, error) {
ret := _m.Called(params)

View file

@ -416,6 +416,104 @@ func (_c *MockClientCommandsServer_AccountLocalLinkSolveChallenge_Call) RunAndRe
return _c
}
// AccountMigrate provides a mock function with given fields: _a0, _a1
func (_m *MockClientCommandsServer) AccountMigrate(_a0 context.Context, _a1 *pb.RpcAccountMigrateRequest) *pb.RpcAccountMigrateResponse {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for AccountMigrate")
}
var r0 *pb.RpcAccountMigrateResponse
if rf, ok := ret.Get(0).(func(context.Context, *pb.RpcAccountMigrateRequest) *pb.RpcAccountMigrateResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*pb.RpcAccountMigrateResponse)
}
}
return r0
}
// MockClientCommandsServer_AccountMigrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AccountMigrate'
type MockClientCommandsServer_AccountMigrate_Call struct {
*mock.Call
}
// AccountMigrate is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *pb.RpcAccountMigrateRequest
func (_e *MockClientCommandsServer_Expecter) AccountMigrate(_a0 interface{}, _a1 interface{}) *MockClientCommandsServer_AccountMigrate_Call {
return &MockClientCommandsServer_AccountMigrate_Call{Call: _e.mock.On("AccountMigrate", _a0, _a1)}
}
func (_c *MockClientCommandsServer_AccountMigrate_Call) Run(run func(_a0 context.Context, _a1 *pb.RpcAccountMigrateRequest)) *MockClientCommandsServer_AccountMigrate_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*pb.RpcAccountMigrateRequest))
})
return _c
}
func (_c *MockClientCommandsServer_AccountMigrate_Call) Return(_a0 *pb.RpcAccountMigrateResponse) *MockClientCommandsServer_AccountMigrate_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockClientCommandsServer_AccountMigrate_Call) RunAndReturn(run func(context.Context, *pb.RpcAccountMigrateRequest) *pb.RpcAccountMigrateResponse) *MockClientCommandsServer_AccountMigrate_Call {
_c.Call.Return(run)
return _c
}
// AccountMigrateCancel provides a mock function with given fields: _a0, _a1
func (_m *MockClientCommandsServer) AccountMigrateCancel(_a0 context.Context, _a1 *pb.RpcAccountMigrateCancelRequest) *pb.RpcAccountMigrateCancelResponse {
ret := _m.Called(_a0, _a1)
if len(ret) == 0 {
panic("no return value specified for AccountMigrateCancel")
}
var r0 *pb.RpcAccountMigrateCancelResponse
if rf, ok := ret.Get(0).(func(context.Context, *pb.RpcAccountMigrateCancelRequest) *pb.RpcAccountMigrateCancelResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*pb.RpcAccountMigrateCancelResponse)
}
}
return r0
}
// MockClientCommandsServer_AccountMigrateCancel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AccountMigrateCancel'
type MockClientCommandsServer_AccountMigrateCancel_Call struct {
*mock.Call
}
// AccountMigrateCancel is a helper method to define mock.On call
// - _a0 context.Context
// - _a1 *pb.RpcAccountMigrateCancelRequest
func (_e *MockClientCommandsServer_Expecter) AccountMigrateCancel(_a0 interface{}, _a1 interface{}) *MockClientCommandsServer_AccountMigrateCancel_Call {
return &MockClientCommandsServer_AccountMigrateCancel_Call{Call: _e.mock.On("AccountMigrateCancel", _a0, _a1)}
}
func (_c *MockClientCommandsServer_AccountMigrateCancel_Call) Run(run func(_a0 context.Context, _a1 *pb.RpcAccountMigrateCancelRequest)) *MockClientCommandsServer_AccountMigrateCancel_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*pb.RpcAccountMigrateCancelRequest))
})
return _c
}
func (_c *MockClientCommandsServer_AccountMigrateCancel_Call) Return(_a0 *pb.RpcAccountMigrateCancelResponse) *MockClientCommandsServer_AccountMigrateCancel_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockClientCommandsServer_AccountMigrateCancel_Call) RunAndReturn(run func(context.Context, *pb.RpcAccountMigrateCancelRequest) *pb.RpcAccountMigrateCancelResponse) *MockClientCommandsServer_AccountMigrateCancel_Call {
_c.Call.Return(run)
return _c
}
// AccountMove provides a mock function with given fields: _a0, _a1
func (_m *MockClientCommandsServer) AccountMove(_a0 context.Context, _a1 *pb.RpcAccountMoveRequest) *pb.RpcAccountMoveResponse {
ret := _m.Called(_a0, _a1)

View file

@ -3,10 +3,12 @@
package mock_clientspace
import (
context "context"
anystorage "github.com/anyproto/anytype-heart/space/spacecore/storage/anystorage"
commonspace "github.com/anyproto/any-sync/commonspace"
context "context"
domain "github.com/anyproto/anytype-heart/core/domain"
headsync "github.com/anyproto/any-sync/commonspace/headsync"
@ -21,8 +23,6 @@ import (
smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock"
spacestorage "github.com/anyproto/any-sync/commonspace/spacestorage"
threads "github.com/anyproto/anytype-heart/pkg/lib/threads"
treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage"
@ -1511,19 +1511,19 @@ func (_c *MockSpace_Remove_Call) RunAndReturn(run func(context.Context, string)
}
// Storage provides a mock function with given fields:
func (_m *MockSpace) Storage() spacestorage.SpaceStorage {
func (_m *MockSpace) Storage() anystorage.ClientSpaceStorage {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Storage")
}
var r0 spacestorage.SpaceStorage
if rf, ok := ret.Get(0).(func() spacestorage.SpaceStorage); ok {
var r0 anystorage.ClientSpaceStorage
if rf, ok := ret.Get(0).(func() anystorage.ClientSpaceStorage); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spacestorage.SpaceStorage)
r0 = ret.Get(0).(anystorage.ClientSpaceStorage)
}
}
@ -1547,12 +1547,12 @@ func (_c *MockSpace_Storage_Call) Run(run func()) *MockSpace_Storage_Call {
return _c
}
func (_c *MockSpace_Storage_Call) Return(_a0 spacestorage.SpaceStorage) *MockSpace_Storage_Call {
func (_c *MockSpace_Storage_Call) Return(_a0 anystorage.ClientSpaceStorage) *MockSpace_Storage_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockSpace_Storage_Call) RunAndReturn(run func() spacestorage.SpaceStorage) *MockSpace_Storage_Call {
func (_c *MockSpace_Storage_Call) RunAndReturn(run func() anystorage.ClientSpaceStorage) *MockSpace_Storage_Call {
_c.Call.Return(run)
return _c
}

View file

@ -82,53 +82,6 @@ func (_c *MockClientStorage_AllSpaceIds_Call) RunAndReturn(run func() ([]string,
return _c
}
// BindSpaceID provides a mock function with given fields: spaceID, objectID
func (_m *MockClientStorage) BindSpaceID(spaceID string, objectID string) error {
ret := _m.Called(spaceID, objectID)
if len(ret) == 0 {
panic("no return value specified for BindSpaceID")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(spaceID, objectID)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockClientStorage_BindSpaceID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BindSpaceID'
type MockClientStorage_BindSpaceID_Call struct {
*mock.Call
}
// BindSpaceID is a helper method to define mock.On call
// - spaceID string
// - objectID string
func (_e *MockClientStorage_Expecter) BindSpaceID(spaceID interface{}, objectID interface{}) *MockClientStorage_BindSpaceID_Call {
return &MockClientStorage_BindSpaceID_Call{Call: _e.mock.On("BindSpaceID", spaceID, objectID)}
}
func (_c *MockClientStorage_BindSpaceID_Call) Run(run func(spaceID string, objectID string)) *MockClientStorage_BindSpaceID_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}
func (_c *MockClientStorage_BindSpaceID_Call) Return(err error) *MockClientStorage_BindSpaceID_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockClientStorage_BindSpaceID_Call) RunAndReturn(run func(string, string) error) *MockClientStorage_BindSpaceID_Call {
_c.Call.Return(run)
return _c
}
// Close provides a mock function with given fields: ctx
func (_m *MockClientStorage) Close(ctx context.Context) error {
ret := _m.Called(ctx)
@ -175,9 +128,9 @@ func (_c *MockClientStorage_Close_Call) RunAndReturn(run func(context.Context) e
return _c
}
// CreateSpaceStorage provides a mock function with given fields: payload
func (_m *MockClientStorage) CreateSpaceStorage(payload spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error) {
ret := _m.Called(payload)
// CreateSpaceStorage provides a mock function with given fields: ctx, payload
func (_m *MockClientStorage) CreateSpaceStorage(ctx context.Context, payload spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error) {
ret := _m.Called(ctx, payload)
if len(ret) == 0 {
panic("no return value specified for CreateSpaceStorage")
@ -185,19 +138,19 @@ func (_m *MockClientStorage) CreateSpaceStorage(payload spacestorage.SpaceStorag
var r0 spacestorage.SpaceStorage
var r1 error
if rf, ok := ret.Get(0).(func(spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error)); ok {
return rf(payload)
if rf, ok := ret.Get(0).(func(context.Context, spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error)); ok {
return rf(ctx, payload)
}
if rf, ok := ret.Get(0).(func(spacestorage.SpaceStorageCreatePayload) spacestorage.SpaceStorage); ok {
r0 = rf(payload)
if rf, ok := ret.Get(0).(func(context.Context, spacestorage.SpaceStorageCreatePayload) spacestorage.SpaceStorage); ok {
r0 = rf(ctx, payload)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(spacestorage.SpaceStorage)
}
}
if rf, ok := ret.Get(1).(func(spacestorage.SpaceStorageCreatePayload) error); ok {
r1 = rf(payload)
if rf, ok := ret.Get(1).(func(context.Context, spacestorage.SpaceStorageCreatePayload) error); ok {
r1 = rf(ctx, payload)
} else {
r1 = ret.Error(1)
}
@ -211,14 +164,15 @@ type MockClientStorage_CreateSpaceStorage_Call struct {
}
// CreateSpaceStorage is a helper method to define mock.On call
// - ctx context.Context
// - payload spacestorage.SpaceStorageCreatePayload
func (_e *MockClientStorage_Expecter) CreateSpaceStorage(payload interface{}) *MockClientStorage_CreateSpaceStorage_Call {
return &MockClientStorage_CreateSpaceStorage_Call{Call: _e.mock.On("CreateSpaceStorage", payload)}
func (_e *MockClientStorage_Expecter) CreateSpaceStorage(ctx interface{}, payload interface{}) *MockClientStorage_CreateSpaceStorage_Call {
return &MockClientStorage_CreateSpaceStorage_Call{Call: _e.mock.On("CreateSpaceStorage", ctx, payload)}
}
func (_c *MockClientStorage_CreateSpaceStorage_Call) Run(run func(payload spacestorage.SpaceStorageCreatePayload)) *MockClientStorage_CreateSpaceStorage_Call {
func (_c *MockClientStorage_CreateSpaceStorage_Call) Run(run func(ctx context.Context, payload spacestorage.SpaceStorageCreatePayload)) *MockClientStorage_CreateSpaceStorage_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(spacestorage.SpaceStorageCreatePayload))
run(args[0].(context.Context), args[1].(spacestorage.SpaceStorageCreatePayload))
})
return _c
}
@ -228,7 +182,7 @@ func (_c *MockClientStorage_CreateSpaceStorage_Call) Return(_a0 spacestorage.Spa
return _c
}
func (_c *MockClientStorage_CreateSpaceStorage_Call) RunAndReturn(run func(spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error)) *MockClientStorage_CreateSpaceStorage_Call {
func (_c *MockClientStorage_CreateSpaceStorage_Call) RunAndReturn(run func(context.Context, spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error)) *MockClientStorage_CreateSpaceStorage_Call {
_c.Call.Return(run)
return _c
}
@ -280,62 +234,6 @@ func (_c *MockClientStorage_DeleteSpaceStorage_Call) RunAndReturn(run func(conte
return _c
}
// GetSpaceID provides a mock function with given fields: objectID
func (_m *MockClientStorage) GetSpaceID(objectID string) (string, error) {
ret := _m.Called(objectID)
if len(ret) == 0 {
panic("no return value specified for GetSpaceID")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
return rf(objectID)
}
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(objectID)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(objectID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClientStorage_GetSpaceID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSpaceID'
type MockClientStorage_GetSpaceID_Call struct {
*mock.Call
}
// GetSpaceID is a helper method to define mock.On call
// - objectID string
func (_e *MockClientStorage_Expecter) GetSpaceID(objectID interface{}) *MockClientStorage_GetSpaceID_Call {
return &MockClientStorage_GetSpaceID_Call{Call: _e.mock.On("GetSpaceID", objectID)}
}
func (_c *MockClientStorage_GetSpaceID_Call) Run(run func(objectID string)) *MockClientStorage_GetSpaceID_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *MockClientStorage_GetSpaceID_Call) Return(spaceID string, err error) *MockClientStorage_GetSpaceID_Call {
_c.Call.Return(spaceID, err)
return _c
}
func (_c *MockClientStorage_GetSpaceID_Call) RunAndReturn(run func(string) (string, error)) *MockClientStorage_GetSpaceID_Call {
_c.Call.Return(run)
return _c
}
// Init provides a mock function with given fields: a
func (_m *MockClientStorage) Init(a *app.App) error {
ret := _m.Called(a)
@ -382,98 +280,6 @@ func (_c *MockClientStorage_Init_Call) RunAndReturn(run func(*app.App) error) *M
return _c
}
// IsSpaceCreated provides a mock function with given fields: id
func (_m *MockClientStorage) IsSpaceCreated(id string) bool {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for IsSpaceCreated")
}
var r0 bool
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(id)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// MockClientStorage_IsSpaceCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSpaceCreated'
type MockClientStorage_IsSpaceCreated_Call struct {
*mock.Call
}
// IsSpaceCreated is a helper method to define mock.On call
// - id string
func (_e *MockClientStorage_Expecter) IsSpaceCreated(id interface{}) *MockClientStorage_IsSpaceCreated_Call {
return &MockClientStorage_IsSpaceCreated_Call{Call: _e.mock.On("IsSpaceCreated", id)}
}
func (_c *MockClientStorage_IsSpaceCreated_Call) Run(run func(id string)) *MockClientStorage_IsSpaceCreated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *MockClientStorage_IsSpaceCreated_Call) Return(created bool) *MockClientStorage_IsSpaceCreated_Call {
_c.Call.Return(created)
return _c
}
func (_c *MockClientStorage_IsSpaceCreated_Call) RunAndReturn(run func(string) bool) *MockClientStorage_IsSpaceCreated_Call {
_c.Call.Return(run)
return _c
}
// MarkSpaceCreated provides a mock function with given fields: id
func (_m *MockClientStorage) MarkSpaceCreated(id string) error {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for MarkSpaceCreated")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockClientStorage_MarkSpaceCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkSpaceCreated'
type MockClientStorage_MarkSpaceCreated_Call struct {
*mock.Call
}
// MarkSpaceCreated is a helper method to define mock.On call
// - id string
func (_e *MockClientStorage_Expecter) MarkSpaceCreated(id interface{}) *MockClientStorage_MarkSpaceCreated_Call {
return &MockClientStorage_MarkSpaceCreated_Call{Call: _e.mock.On("MarkSpaceCreated", id)}
}
func (_c *MockClientStorage_MarkSpaceCreated_Call) Run(run func(id string)) *MockClientStorage_MarkSpaceCreated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *MockClientStorage_MarkSpaceCreated_Call) Return(err error) *MockClientStorage_MarkSpaceCreated_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockClientStorage_MarkSpaceCreated_Call) RunAndReturn(run func(string) error) *MockClientStorage_MarkSpaceCreated_Call {
_c.Call.Return(run)
return _c
}
// Name provides a mock function with given fields:
func (_m *MockClientStorage) Name() string {
ret := _m.Called()
@ -611,52 +417,6 @@ func (_c *MockClientStorage_SpaceExists_Call) RunAndReturn(run func(string) bool
return _c
}
// UnmarkSpaceCreated provides a mock function with given fields: id
func (_m *MockClientStorage) UnmarkSpaceCreated(id string) error {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for UnmarkSpaceCreated")
}
var r0 error
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockClientStorage_UnmarkSpaceCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnmarkSpaceCreated'
type MockClientStorage_UnmarkSpaceCreated_Call struct {
*mock.Call
}
// UnmarkSpaceCreated is a helper method to define mock.On call
// - id string
func (_e *MockClientStorage_Expecter) UnmarkSpaceCreated(id interface{}) *MockClientStorage_UnmarkSpaceCreated_Call {
return &MockClientStorage_UnmarkSpaceCreated_Call{Call: _e.mock.On("UnmarkSpaceCreated", id)}
}
func (_c *MockClientStorage_UnmarkSpaceCreated_Call) Run(run func(id string)) *MockClientStorage_UnmarkSpaceCreated_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *MockClientStorage_UnmarkSpaceCreated_Call) Return(err error) *MockClientStorage_UnmarkSpaceCreated_Call {
_c.Call.Return(err)
return _c
}
func (_c *MockClientStorage_UnmarkSpaceCreated_Call) RunAndReturn(run func(string) error) *MockClientStorage_UnmarkSpaceCreated_Call {
_c.Call.Return(run)
return _c
}
// WaitSpaceStorage provides a mock function with given fields: ctx, id
func (_m *MockClientStorage) WaitSpaceStorage(ctx context.Context, id string) (spacestorage.SpaceStorage, error) {
ret := _m.Called(ctx, id)