Add some constructors or setters #73

Open
opened 2025-12-28 18:12:27 +00:00 by sami · 0 comments
Owner

Originally created by @smallhive on GitHub (Jun 26, 2023).

Writing unit tests requires creating the following structures, to override rpc calls from client:

  • rpc.PutRequestWriter
  • rpc.GetResponseReader
  • rpc.ObjectRangeResponseReader
  • rpc.SearchResponseReader

The problem is, these structures contain private fields of public types and there is no way (neither constructor nor setter) to set them up outside api-go. Without them, some client methods can't be tested without real node

Originally created by @smallhive on GitHub (Jun 26, 2023). Writing [unit tests](https://github.com/nspcc-dev/neofs-sdk-go/pull/453/files#diff-3ed05f0e53e2f79a0bbbc60951df9d736a449c7cf79c095588d375789f560de3R584) requires creating the following structures, to override rpc calls from [client](https://github.com/nspcc-dev/neofs-sdk-go/blob/master/client/client.go): - rpc.PutRequestWriter - rpc.GetResponseReader - rpc.ObjectRangeResponseReader - rpc.SearchResponseReader The problem is, these structures contain private fields of public types and there is no way (neither constructor nor setter) to set them up outside `api-go`. Without them, some client methods can't be tested without real node
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-api-go#73
No description provided.