forked from TrueCloudLab/frostfs-sdk-go
8e3173eacd
There is a need to test each `Client` operation. In previous implementation `Client` was based on real socket connection. This didn't allow to test the `Client` without OS resources. In order to write convenient and useful unit tests we need to slightly refactor the code. Introduce `neoFSAPIServer` interface as a provider of `Client` type's abstraction from the exact NeoFS API server. Add `netMapSnapshot` method for initial implementation. Define core interface provider used in real code. Set `coreServer` as an underlying `neoFSAPIServer` in `Client.Dial`. Cover `Client.NetMapSnapshot` method with unit tests using the opportunity to override the server. From now client library can be tested not only with real physical listeners but with imitations. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru> |
||
---|---|---|
.. | ||
status | ||
accounting.go | ||
api.go | ||
client.go | ||
client_test.go | ||
common.go | ||
container.go | ||
doc.go | ||
errors.go | ||
errors_test.go | ||
netmap.go | ||
netmap_test.go | ||
object_delete.go | ||
object_get.go | ||
object_hash.go | ||
object_put.go | ||
object_search.go | ||
object_search_test.go | ||
reputation.go | ||
response.go | ||
session.go |