Skip to content

Commit

Permalink
Fix tests (#1090)
Browse files Browse the repository at this point in the history
Closes #1086.
  • Loading branch information
roman-khimov authored Mar 3, 2025
2 parents 03908e0 + e21d79c commit 8a00747
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/layer/neofs_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ func (t *TestNeoFS) ReadObject(ctx context.Context, prm PrmObjectRead) (*ObjectP
}, nil
}

func (t *TestNeoFS) GetObject(ctx context.Context, prm GetObject) (*ObjectPart, error) {
var prmObjectRead = PrmObjectRead{
PrmAuth: prm.PrmAuth,
Container: prm.Container,
Object: prm.Object,
WithHeader: true,
WithPayload: true,
}

return t.ReadObject(ctx, prmObjectRead)
}

func (t *TestNeoFS) constructMupltipartObject(ctx context.Context, containerID cid.ID, linkingObject *object.Object) (*ObjectPart, error) {
if linkingObject.GetParentID().IsZero() {
return nil, fmt.Errorf("linking object is invalid")
Expand Down Expand Up @@ -339,7 +351,7 @@ func (t *TestNeoFS) CreateObject(_ context.Context, prm PrmObjectCreate) (oid.ID
realHeaderObj.SetContainerID(prm.Container)
realHeaderObj.SetID(pid)
realHeaderObj.SetPayloadSize(uint64(len(payload)))
realHeaderObj.SetAttributes(attrs...)
realHeaderObj.SetAttributes(prm.Multipart.HeaderObject.Attributes()...)
realHeaderObj.SetCreationEpoch(t.currentEpoch)
realHeaderObj.SetOwner(prm.Creator)
realHeaderObj.SetPayload(payload)
Expand Down

0 comments on commit 8a00747

Please sign in to comment.