Fix mock
This commit is contained in:
parent
24395ec7bf
commit
f005c82bf5
@ -52,7 +52,7 @@ func TestSpaceDeleteIds(t *testing.T) {
|
|||||||
acc := fx.account.Account()
|
acc := fx.account.Account()
|
||||||
rk := crypto.NewAES()
|
rk := crypto.NewAES()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
totalObjs := 3000
|
totalObjs := 1500
|
||||||
|
|
||||||
// creating space
|
// creating space
|
||||||
sp, err := fx.spaceService.CreateSpace(ctx, SpaceCreatePayload{
|
sp, err := fx.spaceService.CreateSpace(ctx, SpaceCreatePayload{
|
||||||
@ -126,7 +126,7 @@ func TestSpaceDeleteIdsIncorrectSnapshot(t *testing.T) {
|
|||||||
acc := fx.account.Account()
|
acc := fx.account.Account()
|
||||||
rk := crypto.NewAES()
|
rk := crypto.NewAES()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
totalObjs := 3000
|
totalObjs := 1500
|
||||||
partialObjs := 300
|
partialObjs := 300
|
||||||
|
|
||||||
// creating space
|
// creating space
|
||||||
@ -209,7 +209,7 @@ func TestSpaceDeleteIdsMarkDeleted(t *testing.T) {
|
|||||||
acc := fx.account.Account()
|
acc := fx.account.Account()
|
||||||
rk := crypto.NewAES()
|
rk := crypto.NewAES()
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
totalObjs := 3000
|
totalObjs := 1500
|
||||||
|
|
||||||
// creating space
|
// creating space
|
||||||
sp, err := fx.spaceService.CreateSpace(ctx, SpaceCreatePayload{
|
sp, err := fx.spaceService.CreateSpace(ctx, SpaceCreatePayload{
|
||||||
|
|||||||
@ -32,6 +32,10 @@ type mockConf struct {
|
|||||||
configuration nodeconf.Configuration
|
configuration nodeconf.Configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *mockConf) NetworkCompatibilityStatus() nodeconf.NetworkCompatibilityStatus {
|
||||||
|
return nodeconf.NetworkCompatibilityStatusOk
|
||||||
|
}
|
||||||
|
|
||||||
func (m *mockConf) Init(a *app.App) (err error) {
|
func (m *mockConf) Init(a *app.App) (err error) {
|
||||||
accountKeys := a.MustComponent(accountService.CName).(accountService.Service).Account()
|
accountKeys := a.MustComponent(accountService.CName).(accountService.Service).Account()
|
||||||
networkId := accountKeys.SignKey.GetPublic().Network()
|
networkId := accountKeys.SignKey.GetPublic().Network()
|
||||||
@ -63,10 +67,6 @@ func (m *mockConf) Close(ctx context.Context) (err error) {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newMockConf() *mockConf {
|
|
||||||
return &mockConf{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *mockConf) Id() string {
|
func (m *mockConf) Id() string {
|
||||||
return m.id
|
return m.id
|
||||||
}
|
}
|
||||||
@ -297,7 +297,7 @@ func newFixture(t *testing.T) *spaceFixture {
|
|||||||
config: &mockConfig{},
|
config: &mockConfig{},
|
||||||
app: &app.App{},
|
app: &app.App{},
|
||||||
account: &accounttest.AccountTestService{},
|
account: &accounttest.AccountTestService{},
|
||||||
configurationService: newMockConf(),
|
configurationService: &mockConf{},
|
||||||
storageProvider: spacestorage.NewInMemorySpaceStorageProvider(),
|
storageProvider: spacestorage.NewInMemorySpaceStorageProvider(),
|
||||||
peermanagerProvider: &mockPeerManagerProvider{},
|
peermanagerProvider: &mockPeerManagerProvider{},
|
||||||
treeManager: &mockTreeManager{},
|
treeManager: &mockTreeManager{},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user